MATLAB: How to solve three non-linear equations having 3 unknowns in MATLAB

non-linear equation

My non-linear equations are—

Best Answer

Use the Optimization Toolbox fsolve function:
% MAPPING: x(1) = a, x(2) = b, x(3) = c
fcn = @(x) [cos(x(1))-cos(x(2))+cos(x(3)) + 27.27; cos(5*x(1))-cos(5*x(2))+cos(5*x(3)) - 0.5; cos(7*x(1))-cos(7*x(2))+cos(7*x(3)) - 0.5];
x0 = [1; 1; 1];
[x, fv] = fsolve(fcn, x0);
Be sure to see the documentation for optimoptions and specifically MaxFunEvals, since fsolve encountered that limit before it was happy with the solution (assuming one exists).