12.07.2015 Views

What Is Optimization Toolbox?

What Is Optimization Toolbox?

What Is Optimization Toolbox?

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

fminimaxfunThe function to be minimized. fun is a function that accepts a vector x andreturns a vector F, the objective functions evaluated at x. The function fun canbe specified as a function handle for an M-file functionx = fminimax(@myfun,x0)where myfun is a MATLAB function such asfunction F = myfun(x)F = ...% Compute function values at xfun can also be a function handle for an anonymous function.x = fminimax(@(x)sin(x.*x),x0);If the user-defined values for x and F are matrices, they are converted to avector using linear indexing.To minimize the worst case absolute values of any of the elements of thevector F(x) (i.e., min{max abs{F(x)} } ), partition those objectives into the firstelements of F and use optimset to set the MinAbsMax option to be the numberof such objectives.If the gradient of the objective function can also be computed and the GradObjoption is 'on', assetbyoptions = optimset('GradObj','on')then the function fun must return, in the second output argument, the gradientvalue G, amatrix,atx. Notethatbycheckingthevalueofnargout, the functioncan avoid computing G when myfun is called with only one output argument (inthe case where the optimization algorithm only needs the value of F but not G).function [F,G] = myfun(x)F = ...% Compute the function values at xif nargout > 1 % Two output argumentsG = ... % Gradients evaluated at xend8-57

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

Saved successfully!

Ooh no, something went wrong!