Académique Documents
Professionnel Documents
Culture Documents
There are many Matlab features which cannot be included in these introductory notes. Listed below are some of the Matlab functions and operators available, rouped by sub!ect area "#ource$ Matlab %ser&s 'uide, version (.5). %se the on*line help facility or consult the %ser&s 'uide for more detailed information on the functions. There are many functions beyond these. There e+ist, in particular, several ,toolbo+es, of functions for specific areas- included amon such are si nal processin , control systems, robust*control, system identification, optimi.ation, splines, chemometrics, mu*analysis and synthesis, state*space identification, and neural networ/s. "The toolbo+es, which are optional, may not be installed on your system.) These can be e+plored via the command help.
help demo who what size length clear computer ^C exit quit help facility run demonstrations list variables in memory list M-files on disk row and column dimensions vector length clear workspace type of computer local abort exit Matlab same as exit
Matri+01rray 2perators
Matrix Operators rray Operators --------------------------------------------------! addition ! addition subtraction subtraction " multiplication #" multiplication $ right division #$ right division % left division #% left division ^ power #^ power & con'ugate transpose #& transpose
less than less than or equal greater than greater than or equal equal not equal and or not
#pecial 4haracters
) assignment statement
. / 0 1 # ### 2 3 4 5 6
used to form vectors and matrices see . arithmetic expression precedence see 0 decimal point continue statement to next line separate subscripts and function arguments end rows2 suppress printing comments subscripting2 vector generation execute operating system command
#pecial 5alues
ans eps pi i2 ' inf 8a8 clock date flops nargin nargout
answer when expression not assigned floating point precision pi sqrt0-71 infinity 8ot-a-8umber wall clock date floating point operation count number of function input arguments number of function output arguments
6is/ 7iles
chdir delete diary dir load save type what fprintf pack change current directory delete file diary of the session directory of files on disk load variables from file save variables to file list function or file show M-files on disk write to a file compact memory via save
#pecial Matrices
compan diag eye gallery hadamard hankel hilb invhilb linspace logspace magic meshdom ones pascal rand toeplitz vander companion diagonal identity esoteric 9adamard 9ankel 9ilbert inverse 9ilbert linearly spaced vectors logarithmically spaced vectors magic square domain for mesh points constant :ascal random elements ;oeplitz <andermonde
zeros
zero
Matri+ Manipulation
rot=> fliplr flipud diag tril triu reshape #& 5
rotation flip matrix left-to-right flip matrix up-to-down diagonal matrices lower triangular part upper triangular part reshape transpose convert matrix to single column3
051
4ontrol 7low
if elseif else end for while break return pause conditionally execute statements used with if used with if terminate bif2 for2 while repeat statements a number of times do while break out of for and while loops return from functions pause until key pressed
get numbers from keyboard call keyboard as M-file display error message define function interpret text in variables evaluate function given by string enable command echoing check if variables exist set case sensitivity define global variables startup M-file get environment string select item from menu elapsed time
convert string to
?C@@ values
evaluate text macro convert number to string convert integer to string set flag indicating matrix is a string convert number to string detect string variables compare string variables convert hex string to number
4ommand 9indow
clc home format disp fprintf echo clear command screen move cursor home set output display format display matrix or text print formatted number enable command echoing
'raph 8aper
plot loglog semilogx semilogy polar mesh contour meshdom bar stairs errorbar linear B-C plot loglog B-C plot semi-log B-C plot semi-log B-C plot polar plot D-dimensional mesh surface contour plot domain for mesh plots bar charts stairstep graph add error bars
'raph 1nnotation
title xlabel ylabel grid text gtext ginput
plot title x-axis label y-axis label draw grid lines arbitrarily position text mouse-positioned text graphics input
angle sqrt real imag con' round fix floor ceil sign rem exp log log7>
phase angle square root real part imaginary part complex con'ugate round to nearest integer round toward zero round toward -infinity round toward infinity signum function remainder exponential base e natural logarithm log base 7>
#pecial 7unctions
bessel gamma rat erf inverf ellipk ellip'
bessel function gamma function rational approximation error function inverse error function complete elliptic integral of first kind Eacobian elliptic integral
schur svd
Matri+ 4onditionin
cond norm rank rcond condition number in A-norm 7-norm2A-norm2I-norm2 infinity-norm rank condition estimate 0reciprocal1
8olynomials
poly roots roots7 polyval polyvalm conv deconv residue polyfit characteristic polynomial polynomial roots---companion matrix method polynomial roots---Kaguerre&s method polynomial evaluation matrix polynomial evaluation multiplication division partial-fraction expansion polynomial curve fitting
maximum value minimum value mean value median value standard deviation sorting sum of elements product of elements cumulative sum of elements cumulative product of elements approximate derivatives histograms correlation coefficients covariance matrix reorder into complex pairs
#i nal 8rocessin
abs angle conv corrcoef cov deconv complex magnitude phase angle convolution correlation coefficients covariance deconvolution
radix-A fast Iourier transform two-dimensional II; inverse fast Iourier transform inverse A-L II; II; rearrangement
minimum of a function of one variable minimum of a multivariable function solution of a system of nonlinear equations 0zeros of a multivariable function1 zero of a function of one variable
<nterpolation
spline table7 tableA cubic spline 7-L table look-up A-L table look-up