MCB419 logo  



Matlab

Getting started


MATLAB has a built-in help feature. Type 'helpdesk' at the MATLAB command prompt: (i.e., >> helpdesk ). Then, on the "Contents" panel of the Help Navigator, go to MATLAB > Getting Started. Or, you can find the same information on the web on the Mathworks site: learning MATLAB. Before you start writing much MATLAB code you should read the Matlab Programming Style Guide (PDF, 14 pp).

Most common MATLAB functions

MATLAB has hundreds of functions, but you only need to know a small subset of these for carrying out the homework assignments in this course. Following is an alphabetic list of the most common MATLAB functions that you are likely to need: (if you find something missing, send email and I'll update the list)

abs, any, atan2, axes, axis, ceil, cla, clear, clf, cos, delete, diff, disp, drawnow, exp, false, figure, find, fix, floor, fprintf, gca, gcf, get, grid, hist, hold, load, log, log10, loglog, max, mean, median, min, mod, num2str, ones, pause, pi, plot, rand, randn, rectangle, rem, repmat, reshape, round, save, semilogx, semilogy, set, sign, sin, size, sort, sprintf, sqrt, std, strcmp, subplot, sum, tan, tic, title, toc, true, uicontrol, xlabel, ylabel, zeros

Most common MATLAB programming constructs

for...end (break, continue)
if...elseif...else...end
try...catch...end
return
switch... case... end
while...end (break, continue)

MATLAB operators and special characters

Arithmetic Operators + - * / \ ^ '
Relational Operators < > <= >= == ~=
Logical Operators: Elementwise & | ~
Logical Operators: Short-circuit && ||
Special Characters [ ] ( ) {} = ' . ... , ; : % ! @
colon (:)

MATLAB graphics and user interface elements

Here's a useful document describing MATLAB Handle Graphics and Properties.

PDF documentation

And finally, here are about 2500 pages (!!) of PDF documentation, some of which you might find useful (particularly if you're having trouble falling asleep at night). Don't panic...we'll be covering the important points in class.

Getting Started with MATLAB (PDF, 186 pp)
Desktop Tools and Development Environment (PDF, 452 pp)
Mathematics (PDF, 366 pp)
Programming (PDF, 680 pp)
MATLAB Programming Tips (PDF, 56 pp)
Using MATLAB Graphics (PDF, 702 pp)
Creating Graphical User Interfaces (PDF, 220 pp)


Copyright © Mark E. Nelson, University of Illinois at Urbana-Champaign, 2005-2008. All rights reserved.