12.07.2015 Views

Matlab/Octave Tutorial

Matlab/Octave Tutorial

Matlab/Octave Tutorial

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.

•Suppose you want the value of d 2 g/dy 2 for y =2.•What does the following give you?>> y = 2, diff2_g•So use subs command (see >>help sym/subs).>> diff2_g2=subs(diff2_g,2)•If you have more than one variable, you must use thefollowing syntax:subs(expression,{var1,var2 ...},{value 1, value 2, ..})•Exercise: find diff_f for x = 1, a = 2, b = 3, c = 4(remember f = e -ax x 3b sin(cx), diff_f=df/dx)134

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

Saved successfully!

Ooh no, something went wrong!