MATLAB Array
MATLAB Array
Category Description
Basic Information
disp Display array
display Display array
isempty True for empty matrix
isequal True if arrays are identical
islogical True for logical array
isnumeric True for numeric arrays
issparse True for sparse matrix
length Length of vector
ndims Number of dimensions
numel Number of elements
size Size of matrix
Operators
+ Addition
+ Unary plus
- Subtraction
- Unary minus
* Matrix multiplication
^ Matrix power
\ Backslash or left matrix divide
1-8
Mathematics
1-9
1 Functions By Category
Specialized Matrices
compan Companion matrix
gallery Test matrices
hadamard Hadamard matrix
hankel Hankel matrix
hilb Hilbert matrix
invhilb Inverse of Hilbert matrix
magic Magic square
pascal Pascal matrix
rosser Classic symmetric eigenvalue test problem
toeplitz Toeplitz matrix
vander Vandermonde matrix
wilkinson Wilkinson’s eigenvalue test matrix
Linear Algebra
• “Matrix Analysis”
• “Linear Equations”
• “Eigenvalues and Singular Values”
• “Matrix Logarithms and Exponentials”
• “Factorization”
1-10
Mathematics
Matrix Analysis
cond Condition number with respect to inversion
condeig Condition number with respect to eigenvalues
det Determinant
norm Matrix or vector norm
normest Estimate matrix 2-norm
null Null space
orth Orthogonalization
rank Matrix rank
rcond Matrix reciprocal condition number estimate
rref Reduced row echelon form
subspace Angle between two subspaces
trace Sum of diagonal elements
Linear Equations
\ and / Linear equation solution
chol Cholesky factorization
cholinc Incomplete Cholesky factorization
cond Condition number with respect to inversion
condest 1-norm condition number estimate
funm Evaluate general matrix function
inv Matrix inverse
lscov Least squares solution in presence of known covariance
lsqnonneg Nonnegative least squares
lu LU matrix factorization
luinc Incomplete LU factorization
pinv Moore-Penrose pseudoinverse of matrix
qr Orthogonal-triangular decomposition
rcond Matrix reciprocal condition number estimate
1-11
1 Functions By Category
Factorization
balance Diagonal scaling to improve eigenvalue accuracy
cdf2rdf Complex diagonal form to real block diagonal form
chol Cholesky factorization
cholinc Incomplete Cholesky factorization
cholupdate Rank 1 update to Cholesky factorization
lu LU matrix factorization
luinc Incomplete LU factorization
planerot Givens plane rotation
qr Orthogonal-triangular decomposition
qrdelete Delete column from QR factorization
qrinsert Insert column in QR factorization
qrupdate Rank 1 update to QR factorization
qz QZ factorization for generalized eigenvalues
rsf2csf Real block diagonal form to complex diagonal form
Elementary Math
• “Trigonometric”
• “Exponential”
• “Complex”
• “Rounding and Remainder”
• “Discrete Math (e.g., Prime Factors)”
Trigonometric
acos, acosh Inverse cosine and inverse hyperbolic cosine
acot, acoth Inverse cotangent and inverse hyperbolic cotangent
acsc, acsch Inverse cosecant and inverse hyperbolic cosecant
asec, asech Inverse secant and inverse hyperbolic secant
asin, asinh Inverse sine and inverse hyperbolic sine
1-12
Mathematics
Exponential
exp Exponential
log Natural logarithm
log2 Base 2 logarithm and dissect floating-point numbers into exponent and
mantissa
log10 Common (base 10) logarithm
nextpow2 Next higher power of 2
pow2 Base 2 power and scale floating-point number
sqrt Square root
Complex
abs Absolute value
angle Phase angle
complex Construct complex data from real and imaginary parts
conj Complex conjugate
cplxpair Sort numbers into complex conjugate pairs
i Imaginary unit
imag Complex imaginary part
isreal True for real array
j Imaginary unit
real Complex real part
unwrap Unwrap phase angle
1-13
1 Functions By Category
Basic Operations
cumprod Cumulative product
cumsum Cumulative sum
cumtrapz Cumulative trapezoidal numerical integration
max Maximum elements of array
mean Average or mean value of arrays
median Median value of arrays
min Minimum elements of array
prod Product of array elements
sort Sort elements in ascending order
sortrows Sort rows in ascending order
std Standard deviation
sum Sum of array elements
trapz Trapezoidal numerical integration
var Variance
Finite Differences
del2 Discrete Laplacian
diff Differences and approximate derivatives
gradient Numerical gradient
1-14