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.

fzeroNote For the purposes of this command, zeros are considered to bepoints where the function actually crosses—not just touches—the x-axis.“Avoiding Global Variables via Anonymous and Nested Functions” onpage 2-20 explains how to parameterize the objective function fun, ifnecessary.InputArguments“Function Arguments” on page 6-2 contains general descriptions ofarguments passed into fzero. This section provides function-specificdetails for fun and options:funThefunctionwhosezeroistobecomputed. fun is afunction handle for a function that accepts a scalar x andreturns a scalar, the objective function evaluated at x. Thefunction fun can be specified as a function handle for anM-file functionx = fzero(@myfun,x0)where myfun is a MATLAB function such asfunction f = myfun(x)f = ...% Compute function value at xfun can also be a function handle for an anonymousfunction.x = fzero(@(x)sin(x*x),x0);options<strong>Optimization</strong> options. You can set or change the valuesof these options using the optimset function. fzero usesthese options structure fields:8-124

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

Saved successfully!

Ooh no, something went wrong!