Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Reduce the number of fminsearch iterations
Replies: 2   Last Post: Oct 30, 2013 9:37 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 892
Registered: 9/26/13
Re: Reduce the number of fminsearch iterations
Posted: Oct 30, 2013 9:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


"Torsten " <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message
news:l4qq78$pdt$1@newscl01ah.mathworks.com...
> "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/output-functions.html


Or use FZERO or FSOLVE (from Optimization Toolbox) to find a zero of your
function. FZERO will work if your objective function is a function of one
variable; use FSOLVE for functions of more than one variable.

If FZERO or FSOLVE indicate that they weren't able to find a zero of your
function, then you can switch to FMINSEARCH and let it go until it finds a
minimizer for your function.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.