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.

fzeroPurposeSyntaxDescriptionFind root of continuous function of one variablex = fzero(fun,x0)x = fzero(fun,x0,options)[x,fval] = fzero(...)[x,fval,exitflag] = fzero(...)[x,fval,exitflag,output] = fzero(...)x = fzero(fun,x0) tries to find a zero of fun near x0, ifx0 is ascalar. fun is a function handle for either an M-file function or ananonymous function. The value x returned by fzero is near a pointwhere fun changes sign, or NaN ifthesearchfails. Inthiscase,thesearch terminates when the search interval is expanded until an Inf,NaN, or complex value is found.If x0 is a vector of length two, fzero assumes x0 is an interval where thesign of fun(x0(1)) differs from the sign of fun(x0(2)). An error occursif this is not true. Calling fzero with such an interval guarantees thatfzero returns a value near a point where fun changes sign.Note Calling fzero with an interval (x0 with two elements) is oftenfaster than calling it with a scalar x0.x = fzero(fun,x0,options) solves the equation with the optimizationoptions specified in the structure options. Useoptimset to set theseoptions.[x,fval] = fzero(...) returns the value of the objective functionfun at the solution x.[x,fval,exitflag] = fzero(...) returns a value exitflag thatdescribes the exit condition.[x,fval,exitflag,output] = fzero(...) returns a structureoutput that contains information about the optimization.8-123

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

Saved successfully!

Ooh no, something went wrong!