An Optimization Function in Matlab

An Optimization Function in Matlab - An Optimization...

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

View Full Document Right Arrow Icon
5/12/2011 1 An Optimization Function in MATLAB® Presenter: Chih-Yung Huang Date: 5/12/11 Presented for MAE 162A Solve Nonlinear Equations Position analysis Prob. 4.30 in textbook Make value(s) of objective function(s) as small as possible 3 3 4 4 3 3 4 4 cos cos 0 sin sin 0 x y R R C R R C  Minimization Problem F ( θ 3 , θ 4 ) ≡ Objective functions Solution θ 3 = 73.16 O θ 4 = 138.51 O
Background image of page 1

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

View Full Document Right Arrow Icon
5/12/2011 2 User-Created Function in MATLAB® Function M-file (like a subroutine, subprogram) Syntax Return value(s) Function’s name: Note: it must be the same as file name. Input argument(s) Matlab Code Function Given C x & C y Calculate the values you’d like to return to main program
Background image of page 2
5/12/2011 3 Matlab Code Main Program Initial Guess Control option: Show all iterations Return values of fsolve x: solution(s) fval: optimized value(s) 2 nd arg. is the initial guess 3 rd arg. is control options fsolve is an optimization function provided by MATLAB® 1 st arg. is objective function’s
Background image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

An Optimization Function in Matlab - An Optimization...

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

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