An Optimization Function in Matlab

# An Optimization Function in Matlab - An Optimization...

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

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

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

View Full Document
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
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

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

View Full Document
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
Ask a homework question - tutors are online