12.07.2015 Views

What Is Optimization Toolbox?

What Is Optimization Toolbox?

What Is Optimization Toolbox?

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples That Use Standard Algorithmsx =-0.7529 0.4332fval =1.5093c =-9.6739ceq =4.0684e-010Note that ceq is equal to 0 within the default tolerance on the constraints of1.0e-006 and that c is less than or equal to 0 as desired.MaximizationThe optimization functions fminbnd, fminsearch, fminunc, fmincon,fgoalattain, fminimax, lsqcurvefit, andlsqnonlin all performminimization of the objective function . Maximization is achieved bysupplying the routines with . Similarly, to achieve maximization forquadprog supply -H and -f, andforlinprog supply -f.Greater-Than-Zero Constraints<strong>Optimization</strong> <strong>Toolbox</strong> assumes that nonlinear inequality constraints are of theform . Greater-than-zero constraints are expressed as less-than-zeroconstraints by multiplying them by -1. For example, a constraint of the formis equivalent to the constraint; a constraint of the formis equivalent to the constraint .Parameterizing Your Function as a Nested FunctionAs an alternative to writing your function as an anonymous function, youcan write a single M-file that• Accepts the additional parameters to your function as inputs.• Invokes the optimization function.• Contains your function as a nested function.The following example illustrates how to write an M-file to find zeros of thex 3 + bx + c, for different values of the coefficients b and c.2-19

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

Saved successfully!

Ooh no, something went wrong!