solving and ploting a system of nonlinear equations
Show older comments
hi everyone,
im trying to solve and plot a system of 2 nonlinear equations but for some reason i cant get matlab to give me the right answer.
this is what i have so far:
function solveeqs()
guess=[6 5];
result=fsolve(@eqns,guess);
result
end
function fcns=eqns(z)
x=z(1);
y=z(2);
fcns(1)=cos(x)-log(y)+1.3258;
fcns(2)=sin(y)-tan(x)-2.4216;
end
matlab tells me that the answer is (5,5.0001) but thats not true.
ive also tried to plot the equations but with no success, also if i plot the graphs in desmos i get completely different results.
im really a begginer in matlab so any help would be greatly appreciated
thanks!
1 Comment
Answers (0)
Categories
Find more on Systems of Nonlinear Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!