Unable to run a simple 'fsolve' example.
Show older comments
Hi,
While running the root2d example file provided with the 'fsolve' document, MATLAB is throwing the following error:
Unrecognized function or variable 'eml_allow_mx_inputs'.
Error in fsolve
The code for root2d file is below and the m-file is placed in the MATLAB directory:
function F = root2d(x)
F(1) = exp(-exp(-(x(1)+x(2)))) - x(2)*(1+x(1)^2);
F(2) = x(1)*cos(x(2)) + x(2)*sin(x(1)) - 0.5;
end
I am running the following syntax to solve 'root2d':
fun = @root2d;
x0 = [0,0];
x = fsolve(fun,x0)
2 Comments
Walter Roberson
on 11 Apr 2023
Experiment with
restoredefaultpath; rehash toolboxcache
If that solves the problem then
savepath
Shiv Tewari
on 11 Apr 2023
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display 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!