Professional Documents
Culture Documents
Numerical Methods Chapter 3 Notes
Numerical Methods Chapter 3 Notes
CHE 384
“Applied Numerical Methods with MATLAB for Engineers and Scientist, Fourth Edition, Chapra”
Chapter 3
M-Files
M-file stands for Matlab and is called that due to
Script files vs Function Files
Script Function
To edit the file as a new function, save the current function, click on new script, and open up
function file that needs to be edited.
Help in MATLAB
If you need to understand what a function does, the help function will tell you
Anonymous:
one-line function created without the need for an M-file
defined by an @ symbol
Is not saved
Good for
simple
functions,
doesn’t need
a full function
file
In class example : (anonymous function):
f (x) =x 3 - x 2 + 6
f (6) =?