14.01.2013 Views

Global Optimization Toolbox User's Guide - MathWorks

Global Optimization Toolbox User's Guide - MathWorks

Global Optimization Toolbox User's Guide - MathWorks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>Global</strong>Search and MultiStart Examples<br />

lsqcurvefit found a local solution that is not particularly close to the model<br />

parameter values (–3,1/4,1/2,1).<br />

Step 5. Set up the problem for MultiStart.<br />

Create a problem structure so MultiStart can solve the same problem.<br />

problem = createOptimProblem('lsqcurvefit','x0',p0,'objective',fitfcn,...<br />

'lb',lb,'ub',ub,'xdata',xdata,'ydata',ydata);<br />

Step6. Findaglobalsolution.<br />

Solve the fitting problem using MultiStart with 50 iterations. Plot the<br />

smallest error as the number of MultiStart iterations.<br />

ms = MultiStart('PlotFcns',@gsplotbestf);<br />

[xmulti,errormulti] = run(ms,problem,50)<br />

MultiStart completed the runs from all start points.<br />

All 50 local solver runs converged with a positive local solver exit flag.<br />

xmulti =<br />

-2.9852 -0.2472 -0.4968 -1.0438<br />

errormulti =<br />

1.6464<br />

3-85

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

Saved successfully!

Ooh no, something went wrong!