[ Team LiB ] Previous Section Next Section

M1.9 Summary of Commonly Used Commands

axis

axis limits for plots

clear

removes all variables from workspace

diary

save the text of a MATLAB session

end

end of loop

exp

exponential function

figure(n)

generates a figure window

for

generates loop structure

format

output display format

function

user generated function

gtext

place text on a plot

help

help function

hold

holds current plot and allows new plot to be placed on current plot

if

conditional test

length

length of a vector

lookfor

keyword search on help variables

plot

plots vectors

size

size of the array (rows, columns)

subplot

multiple plots in a figure window

who

view variables in workspace

whos

view variables in workspace, with more detail (size, etc.)

*

matrix multiplication

'

transpose

;

suppress printing (also end of row, when used in matrices)

.*

element-by-element multiplication

./

element-by-element division

:

denotes a column or row in a matrix; also creates a vector

%

placed before comment statements

    [ Team LiB ] Previous Section Next Section