Professional Documents
Culture Documents
MATLAB Quick Reference: General Purpose Commands
MATLAB Quick Reference: General Purpose Commands
clear
fullfile
Author: Jialong He
Jialong_he@bigfoot.com
http://www.bigfoot.com/~jialong_he
disp
info
length
Length of vector
inmem
Functions in memory
load
ls
memory
matlabroot
mlock
mkdir
munlock
open
openvar
pwd
tempdir
pack
tempname
save
saveas
size
Array dimensions
who, whos
workspace
doc
docopt
genpath
help
helpbrowser
helpdesk
helpwin
lasterr
lastwarn
license
license
lookfor
partialpath
Partial pathname
path
pathtool
profile
profreport
beep
exit
Terminate MATLAB
matlab
matlabrc
clc
echo
format
quit
Terminate MATLAB
home
startup
more
Plus
Minus
Matrix multiplication
.*
Array multiplication
rehash
cd
rmpath
checkin
Matrix power
support
checkout
.^
Array power
type
List file
cmopts
kron
ver
copyfile
version
./ and .\
web
delete
Colon
what
diary
()
Parentheses
whatsnew
dir
[]
Brackets
which
dos
{}
Curly braces
edit
Edit an M-file
Decimal point
fileparts
...
Continuation
filebrowser
Copy file
Comma
cos, cosh
case
Case switch
Semicolon
cot, coth
catch
Comment
csc, csch
continue
Exclamation point
exp
Exponential
else
fix
elseif
Nonconjugated transpose
floor
end
Assignment
gcd
==
Equality
imag
error
<>
Relational operators
lcm
for
&
Logical and
log
Natural logarithm
if
log2
otherwise
return
log10
switch
mod
try
nchoosek
warning
real
while
Logical or
Logical not
xor
Logical exclusive or
Logical Functions
all
any
rem
exist
round
find
sec, sech
Detect state
sign
input
is*
isa
sin, sinh
keyboard
Square root
sqrt
menu
iskeyword
isvarname
pause
logical
mislocked
tan, tanh
Interactive Input
Object-Oriented Programming
class
builtin
double
abs
eval
inferiorto
acos, acosh
evalc
inline
acot, acoth
evalin
acsc, acsch
feval
Function evaluation
isa
angle
Phase angle
function
Function M-files
loadobj
asec, asech
global
saveobj
asin, asinh
nargchk
single
atan, atanh
persistent
superiorto
atan2
script
Script M-files
ceil
complex
conj
Complex conjugate
Control Flow
break
Debugging
dbclear
Clear breakpoints
dbcont
Resume execution
strncmp
dbdown
strncmpi
dbmex
strrep
dbquit
strtok
dbstack
strvcat
ans
dbstatus
symvar
computer
dbstep
texlabel
eps
dbstop
upper
Imaginary unit
dbtype
Inf
Infinity
dbup
inputname
Imaginary unit
char
NaN
Not-a-Number
int2str
nargin,
nargout
mat2str
num2str
nargoutchk
sprintf
pi
sscanf
realmax
str2double
realmin
str2mat
varargin,
varargout
str2num
Function Handles
function_ha MATLAB data type that is a handle to a function
ndle
functions
func2str
str2func
eval
Radix Conversion
Binary to decimal number conversion
real
bin2dec
strings
dec2bin
dec2hex
hex2dec
hex2num
str2func
String Manipulation
deblank
findstr
Matrix Manipulation
Elementary Matrices and Arrays
: (colon)
Calendar
clock
cputime
date
datenum
datestr
datevec
Date components
eomday
End of month
etime
Elapsed time
blkdiag
now
eye
Identity matrix
tic, toc
Stopwatch timer
linspace
weekday
lower
logspace
strcat
String concatenation
numel
ones
strcmp
Compare strings
strcmpi
rand
strjust
randn
strmatch
zeros
Matrix Manipulation
cat
Concatenate arrays
diag
fliplr
flipud
Structure Functions
repmat
reshape
Reshape array
fieldnames
rot90
getfield
tril
rmfield
triu
setfield
: (colon)
struct
struct2cell
Vector Functions
cross
dot
intersect
ismember
setdiff
setxor
union
unique
Specialized Matrices
sub2ind
mu2lin
sound
soundsc
class
isa
methods
auread
methodsview
auwrite
subsasgn
subsindex
subsref
wavread
wavrecord
wavwrite
compan
Companion matrix
gallery
Test matrices
cell
hadamard
Hadamard matrix
cellfun
hankel
Hankel matrix
cellstr
hilb
Hilbert matrix
cell2struct
fclose
invhilb
celldisp
Magic square
cellplot
fopen
magic
pascal
Pascal matrix
num2cell
toeplitz
Toeplitz matrix
wilkinson
Bitwise Functions
Unformatted I/O
Multidimensional Array Functions
cat
Concatenate arrays
flipdim
bitand
Bit-wise AND
ind2sub
bitcmp
Complement bits
ipermute
bitor
Bit-wise OR
bitmax
ndgrid
bitset
Set bit
ndims
bitshift
Bit-wise shift
permute
bitget
Get bit
reshape
Reshape array
bitxor
Bit-wise XOR
shiftdim
Shift dimensions
squeeze
fread
fwrite
Formatted I/O
fgetl
fgets
File Positioning
feof
ferror
rat, rats
hess
poly
fseek
qz
ftell
cart2pol
rsf2csf
cart2sph
schur
Schur decomposition
pol2cart
svd
sph2cart
String Conversion
sprintf
sscanf
Matrix Functions
Matrix Analysis
cond
condeig
det
Matrix determinant
Matrix Functions
expm
Matrix exponential
funm
logm
Matrix logarithm
sqrtm
hdf
HDF interface
norm
imfinfo
null
imread
orth
qrdelete
imwrite
rank
Rank of a matrix
qrinsert
strread
rcond
rref, rrefmovie
subspace
trace
Linear Equations
Cumulative sum
Prime factors
airy
Airy functions
chol
Cholesky factorization
besselh
inv
Matrix inverse
besseli, besselk
lscov
max
mean
besselj, bessely
Bessel functions
lu
LU matrix factorization
median
lsqnonneg
min
ellipj
minres
perms
ellipke
pinv
qr
Orthogonal-triangular decomposition
primes
Error functions
symmlq
Symmetric LQ method
prod
expint
Exponential integral
rectint
factorial
Factorial function
sort
sortrows
std
Standard deviation
sum
trapz
cdf2rdf
eig
gsvd
var
Variance
Finite Differences
del2
Discrete Laplacian
diff
Correlation
corrcoef
Correlation coefficients
cov
Covariance matrix
poly
polyder
Polynomial derivative
polyeig
polyfit
polyint
polyval
bvp4c
bvpget
Polynomial evaluation
bvpinit
bvpset
bvpval
residue
dblquad
roots
Polynomial roots
fminbnd
fminsearch
fzero
ode45, ode23,
ode113, ode15s,
ode23s, ode23t,
ode23tb
odeget
odeset
optimget
optimset
pdepe
pdeval
quad
quadl
vectorize
Vectorize expression
Data Interpolation
Filtering and Convolution
conv
conv2
Two-dimensional convolution
deconv
filter
filter2
convhull
Convex hull
Fourier Transforms
Data gridding
abs
angle
Phase angle
interp1
cplxpair
interp2
fft
interp3
fft2
interpft
interpn
fftshift
ifft
ifft2
ifftn
ifftshift
ndgrid
spdiags
pchip
speye
ppval
sprand
spline
sprandn
tsearch
tsearchn
voronoi
Voronoi diagram
voronoin
conv
full
deconv
sparse
spconvert
luinc
slice
pcg
sphere
Generate sphere
qmr
stem3
qr
Orthogonal-triangular decomposition
waterfall
Waterfall plot
qrdelete
qrinsert
qrupdate
nnz
nonzeros
nzmax
spalloc
clabel
spfun
datetick
spones
grid
eigs
gtext
svds
legend
plotyy
title
xlabel
ylabel
zlabel
Miscellaneous
Reordering Algorithms
colamd
colmmd
colperm
dmperm
Dulmage-Mendelsohn decomposition
spparms
bar
barh
contour
Plot histograms
contourc
Contour computation
contourf
symamd
hist
symmmd
histc
Histogram count
Hold current graph
hold
hidden
symrcm
loglog
meshc
Combination mesh/contourplot
pie
Pie plot
mesh
plot
peaks
polar
surf
normest
2-norm estimate
semilogx
surface
surfc
Combination surf/contourplot
surfl
trimesh
trisurf
semilogy
subplot
bicg
bicgstab
Three-Dimensional Plotting
cgs
bar3
cholinc
bar3h
comet3
lsqr
cylinder
Generate cylinder
fill3
plot3
quiver3
Volume Visualization
coneplot
contourslice
curl
divergence
flow
interpstreamspeed
ezplot3
pbaspect
ezpolar
view
isocaps
ezsurf
viewmtx
ezsurfc
xlim
isocolors
isonormals
feather
Feather plot
ylim
fill
zlim
isosurface
reducepatch
fplot
Plot a function
pareto
reducevolume
Pareto char
pie3
shrinkfaces
slice
plotmatrix
camlight
pcolor
light
smooth3
rose
lighting
Lighting mode
stream2
stream3
quiver
lightangle
ribbon
Ribbon plot
material
streamline
streamparticles
stairs
Stairstep graph
scatter
streamribbon
Scatter plot
scatter3
streamslice
stem
alpha
streamtube
convhull
Convex hull
alphamap
delaunay
Delaunay triangulation
alim
Lighting
Transparency
surf2patch
subvolume
dsearch
inpolygon
polyarea
Area of polygon
tsearch
brighten
Voronoi diagram
caxis
colorbar
colordef
colormap
volumebounds
Domain Generation
griddata
meshgrid
Specialized Plotting
area
Area plot
box
comet
Comet plot
compass
Compass plot
errorbar
ezcontour
ezcontourf
ezmesh
ezmeshc
ezplot
voronoi
View Control
Color Operations
camdolly
graymon
camlookat
hsv2rgb
camorbit
rgb2hsv
RGB to HSVconversion
campan
rgbplot
campos
shading
camproj
spinmap
camroll
surfnorm
camtarget
whitebg
camup
camva
camzoom
Colormaps
daspect
autumn
bone
contrast
cool
copper
flag
setappdata
ginput
zoom
gray
axes
hot
figure
hsv
image
jet
Variant of HSV
light
line
dragrect
lines
patch
drawnow
prism
Rubberband box
spring
rectangle
rbbox
summer
surface
winter
text
uicontextmenu
Printing
Region of Interest
errordlg
orient
helpdlg
pagesetupdlg
inputdlg
listdlg
printdlg
msgbox
printopt
capture
pagedlg
clc
printdlg
clf
Clear figure
questdlg
close
uigetfile
closereq
uiputfile
uisetcolor
uisetfont
warndlg
saveas
gcf
copyobj
newplot
findall
refresh
Refresh figure
findobj
saveas
gcbo
gco
get
rotate
axis
ishandle
cla
Clear Axes
set
gca
Object Manipulation
Reset axis or figure
Interactively rotate the view of a 3-D plot
getappdata
reset
isappdata
rotate3d
rmappdata
guihandles
movegui
openfig
inspect
import
isa
isjava
javaArray
methods
mexWarnMsgTxt
C MX Functions
mxAddField
mxArrayToString
mxAssert
mxAssertS
mxCalcSingleSubscript
mxCalloc
mxChar
mxClassID
mxGetClassID
mxGetClassName
mxGetData
mxGetDimensions
mxGetElementSize
mxGetEps
mxGetField
mxGetFieldByNumber
mxComplexity
mxGetImagData
mxGetInf
mxCreateCellArray
mxGetIr
mxGetJc
mxCreateCellMatrix
mxGetM
mxGetN
mxGetName
mxGetNaN
mxCreateCharArray
mexFunction
mexFunctionName
mexGet
mexGetArray
mxCreateDoubleMatrix
mexGetArrayPtr
mexIsGlobal
mexIsLocked
mexLock
mxGetNumberOfFields
mxGetNzmax
mxCreateScalarDouble
mxGetPi
mxCreateSparse
mxGetPr
mxGetScalar
mxGetString
mxIsCell
mxIsChar
mxIsClass
mxIsComplex
mxIsDouble
mxCreateString
mexPrintf
mxCreateStructArray
mexPutArray
mxCreateStructMatrix
mexSet
mexSetTrapFlag
mexUnlock
mxGetCell
mxClearLogical
mxDestroyArray
mxDuplicateArray
mxFree
mxIsEmpty
mxSetN
fread
mxIsFinite
mxSetName
fscanf
mxIsFromGlobalWS
mxSetNzmax
fwrite
mxSetPi
mxSetPr
stopasync
mxIsInf
mxIsInt8
mxIsInt16
C Engine Routines
mxIsInt32
engClose
engEvalString
mxIsLogical
engGetArray
mxIsNaN
engOpen
mxIsNumeric
engOpenSingleUse
mxIsSingle
engOutputBuffer
fclose
engPutArray
fopen
mxIsSparse
record
mxIsStruct
mxIsUint8
mxIsUint16
mxIsUint32
mxMalloc
mxRealloc
Reallocate memory
mxRemoveField
mxSetAllocFcns
mxSetCell
mxSetClassName
mxSetData
mxSetDimensions
mxSetField
mxSetFieldByNumber
mxSetImagData
mxSetIr
mxSetJc
mxSetLogical
mxSetM
C MAT-File Routines
get
set
State Change
General Purpose
matClose
Close MAT-file
matDeleteArray
clear
matGetArray
delete
matGetArrayHeader
disp
matGetDir
matGetFp
instrfind
matGetNextArray
isvalid
matGetNextArrayHeader
length
matOpen
Open MAT-file
matPutArray
load
matPutArrayAsGlobal
save
Read one line of text from the device and discard the
terminator
fgets
Read one line of text from the device and include the
terminator
fprintf
size
Figure
AlphaMap; BackingStore; BusyAction; ButtonDownFcn; Children;
Clipping; CloseRequestFcn; Color; Colormap; CreateFcn;
CurrentAxes; CurrentCharacter; CurrentObject; CurrentPoint;
DeleteFcn; Dithermap; DithermapMode; DoubleBuffer; FixedColors;
HandleVisibility; HitTest; IntegerHandle; Interruptible;
InvertHardcopy; KeyPressFcn; MenuBar; MinColormap; Name;
NextPlot; NumberTitle; PaperOrientation; PaperPosition;
PaperPositionMode; PaperSize; PaperType; PaperUnits; Parent;
Pointer; PointerShapeCData; PointerShapeHotSpot; Position;
Renderer; RendererMode; Resize; ResizeFcn; Selected;
SelectionHighlight; SelectionType; ShareColors; Tag; Type;
UIContextMenu; Units; UserData; Visible; WindowButtonDownFcn;
WindowButtonMotionFcn; WindowButtonUpFcn; WindowStyle
Axes
ALim; ALimMode; AmbientLightColor; Box; BusyAction;
ButtonDownFcn; CLim; CLimMode; CameraPosition;
CameraPositionMode; CameraTarget; CameraTargetMode;
CameraUpVector; CameraUpVectorMo de; CameraViewAngle;
CameraViewAngleMode; Children; Clipping; Color; ColorOrder;
CreateFcn; CurrentPoint; DataAspectRatio; DataAspectRatioMode;
DeleteFcn; DrawMode; FontAngle; FontName; FontSize; FontUnits;
FontWeight; GridLineStyle; HandleVisibility; HitTest; Interruptible;
Layer; LineStyleOrder; LineWidth; NextPlot; Parent;
PlotBoxAspectRatio; PlotBoxAspectRatioMode; Position; Projection;
Selected; SelectionHighlight; Tag; TickDir; TickDirMode;
TickLength; Title; Type; Units; UIContextMenu; UserData; View;
Visible; XAxisLocation; XColor; Xdir; XGrid; XLabel; XLim;
XLimMode; XScale; XTick; XTickLabel; XTickLabelMode;
XTickMode; YAxisLocation; YColor; YDir; YGrid; YLabel; YLim;
YLimMode; YScale; YTick; YTickLabel; YTickLabelMode;
YTickMode; ZColor; ZDir; ZGrid; ZLabel; ZLim; ZLimMode;
ZScale; ZTick; ZTickLabel; ZTickLabelMode; ZtickMode
Line
BusyAction; ButtonDownFcn; Children; Clipping; Color; CreateFcn;
DeleteFcn; EraseMode; HandleVisibility; HitTest; Interruptible;
LineStyle; LineWidth; Marker; MarkerEdgeColor;
MarkerFaceColor; MarkerSize; Parent; Selected; SelectionHighlight;
Tag; Type; UIContextMenu; UserData; Visible; XData; YData;
ZData
Text
BusyAction; ButtonDownFcn; Children; Clipping; Color; CreateFcn;
DeleteFcn; Editing; EraseMode; Extent; FontAngle; FontName;
FontSize; FontUnits; FontWeight; HandleVisibility; HitTest;
HorizontalAlignment; Interpreter; Interruptible; Parent; Position;
Rotation; Selected; SelectionHighlight; String; Tag; Type;
UIContextMenu; Units; UserData; VerticalAlignment; Visible
Uicontrol
Uimenu
Accelerator; BusyAction; ButtonDownFcn; Callback; Checked;
Children; Clipping; CreateFcn; DeleteFcn; Enable;
ForegroundColor; HandleVisibility; HitTest; Interruptible; Label;
Parent; Position; Selected; SelectionHighlight; Separator; Tag; Type;
UIContextMenu; UserData; Visible