Lecture 18 - MATLAB Function optimset The function optimset...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The function optimset creates an options structure that you can pass as an input argument to the following four MATLAB optimization functions: fminbnd (single variable) local minimizer fminsearch (multi-variables) fzero lsqnonneg nonnegative least-squares constraints problem Example: options = optimset('Display','iter','TolFun',1e-8) This statement creates an optimization options structure in which the Display parameter is set to 'iter' and the TolFun parameter is set to 1e-8. MATLAB Function: optimset
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
options =optimset( 'display','iter' ); >> [x fx]=fzero(@(x) x^10-1,0.5, options ) Search for an interval around 0.5 containing a sign change: Func-count a f(a) b f(b) Procedure 1 0.5 -0.999023 0.5 -0.999023 init. intv 3 0.485858 -0.999267 0.514142 -0.998709 search 5 0.48 -0.999351 0.52 -0.998554 search 7 0.471716 -0.999454 0.528284 -0.998307 search 9 0.46 -0.999576 0.54 -0.997892 search 11 0.443431 -0.999706 0.556569 -0.997148 search 13 0.42 -0.999829 0.58 -0.995692 search 15 0.386863 -0.999925 0.613137 -0.992491 search 17 0.34 -0.999979 0.66 -0.984317 search 19 0.273726 -0.999998 0.726274 -0.959167 search 21 0.18 -1 0.82 -0.862552 search 23 0.0474517 -1 0.952548 -0.385007 search 25 -0.14 -1 1.14 2.70722 search fzero and optimset functions Find sign change after 25 iterations Switch to secant (linear) OR inverse
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/15/2010 for the course EGM 5403 taught by Professor Mei during the Spring '10 term at University of Florida.

Page1 / 19

Lecture 18 - MATLAB Function optimset The function optimset...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online