Why do I receive an error about the recursion limit while using an ODE solver or an Optimization Toolbox function?
Show older comments
When I run the following simple program to optimize a function:
function y=MyMinimize(x)
y=x(1)^2+x(2)^2;
z=fminsearch(@MyMinimize,[1000 1000]);
I used the following function call:
MyMinimize([1 1])
However, this did not work. I received the following error:
??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!