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.

fsolveNonlEqnAlgorithmSpecify one of the following algorithms forsolving nonlinear equations:• 'dogleg' — Trust-region dogleg algorithm(default)• 'lm' — Levenberg-MarquardtLineSearchType• 'gn' — Gauss-NewtonLine search algorithm choice. This optionapplies to the 'lm' (Levenberg-Marquardt)and 'gn' (Gauss-Netwton) algorithms.Examples Example 1This example finds a zero of the system of two equations and twounknowns:You want to solve the following system for xstarting at x0 = [-5 -5].First, write an M-file that computes F, the values of the equations at x.function F = myfun(x)F = [2*x(1) - x(2) - exp(-x(1));-x(1) + 2*x(2) - exp(-x(2))];Next, call an optimization routine.x0 = [-5; -5];% Make a starting guess at the solutionoptions=optimset('Display','iter'); % Option to display output8-116

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

Saved successfully!

Ooh no, something went wrong!