MATLAB You Need to Know
This page lists the built-in MATLAB programming constructs,
built-in functions, and variables that you will need to know for ME 352.
More information on any of these topics is available with the
help
facility.
Programming Constructs
- : (when used to create vectors)
- for ... end
- if ... elseif ... else ... end
- while ... end
- return
- break
- Array operators:
.*
, ./
, .^
Functions for Creating Vectors and Matrices
- linspace
- logspace
- ones
- zeros
- rand, randn
Functions for Getting Information about Vectors and Matrices
- length
- size
- min, max
- abs
- mean
- std
Functions for Printing to the Screen or Files
- disp
- fprintf
Functions for Creating and Annotating Plots
- plot
- semilogx
- semilogy
- loglog
- errorbar
- axis
- grid ['on' | 'off']
- xlabel, ylabel
- legend
- title
- figure
- hold ['on' | 'off']
Built-in Variables
- ans
- i, j
- eps
- relmax, realmin
- nargin, nargout
Special Values (not variables)
- true, false
- NaN
- Inf
- end (when used as an array index)
- : (when used as an array index)