What Is Optimization Toolbox?

What Is Optimization Toolbox? What Is Optimization Toolbox?

cda.psych.uiuc.edu
from cda.psych.uiuc.edu More from this publisher
12.07.2015 Views

fminbndThevalueattheminimumisy = f(x)y =-1If fun is parameterized, you can use anonymous functions to capturethe problem-dependent parameters. For example, suppose you want tominimize the objective function myfun defined by the following M-filefunction.function f = myfun(x,a)f = (x - a)^2;Note that myfun has an extra parameter a, soyoucannotpassitdirectlyto fminbind. To optimize for a specific value of a, suchasa = 1.5.1 Assign the value to a.a = 1.5; % define parameter first2 Call fminbnd with a one-argument anonymous function that capturesthat value of a and calls myfun with two arguments:x = fminbnd(@(x) myfun(x,a),0,1)Algorithmfminbnd is an M-file. The algorithm is based on golden section searchand parabolic interpolation. Unless the left endpoint x 1is very close tothe right endpoint x 2, fminbnd never evaluates fun at the endpoints,so fun need only be defined for x in the interval x 1< x < x 2. If theminimum actually occurs at x 1or x 2, fminbnd returns an interior pointatadistanceofnomorethan2*TolX from x 1or x 2,whereTolX is thetermination tolerance. See [1] or [2] for details about the algorithm.8-32

fminbndLimitationsReferencesThe function to be minimized must be continuous. fminbnd might onlygive local solutions.fminbnd often exhibits slow convergence when the solution is on aboundary of the interval. In such a case, fmincon often gives faster andmore accurate solutions.fminbnd only handles real variables.[1]Forsythe,G.E.,M.A.Malcolm,andC.B.Moler,Computer Methodsfor Mathematical Computations, Prentice Hall, 1976.[2] Brent, Richard. P., Algorithms for Minimization without Derivatives,Prentice-Hall, Englewood Cliffs, New Jersey, 1973.See Also@ (function_handle), fminsearch, fmincon, fminunc, optimset,optimtool, “Anonymous Functions”8-33

fminbndLimitationsReferencesThe function to be minimized must be continuous. fminbnd might onlygive local solutions.fminbnd often exhibits slow convergence when the solution is on aboundary of the interval. In such a case, fmincon often gives faster andmore accurate solutions.fminbnd only handles real variables.[1]Forsythe,G.E.,M.A.Malcolm,andC.B.Moler,Computer Methodsfor Mathematical Computations, Prentice Hall, 1976.[2] Brent, Richard. P., Algorithms for Minimization without Derivatives,Prentice-Hall, Englewood Cliffs, New Jersey, 1973.See Also@ (function_handle), fminsearch, fmincon, fminunc, optimset,optimtool, “Anonymous Functions”8-33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!