Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Torsten
Posts:
1,516
Registered:
11/8/10


Reduce the number of fminsearch iterations
Posted:
Oct 30, 2013 7:23 AM


"Sonia" wrote in message <l4qmda$50k$1@newscl01ah.mathworks.com>... > Is it possible to make the fminsearch algorithm stop as soon as it evaluates the objective function at a given x as zero? > I am optimizing for one variable and what happens is that the fminsearch finds a point where the objective function f(x) = 0, but it continues to iterate until the simplex is contracted around that value of x that gives 0. I would like it to stop as soon as the fun(x)=0
Use an output function to make fminsearch stop iterating: http://www.mathworks.de/de/help/matlab/math/outputfunctions.html
Best wishes Torsten.



