MATLAB Function Reference    

Arrays and Matrices

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
/ Slash or right matrix divide
' Transpose
.' Nonconjugated transpose
.* Array multiplication (element-wise)
.^ Array power (element-wise)
.\ Left array divide (element-wise)
./ Right array divide (element-wise)

Operations and Manipulation

: (colon) Index into array, rearrange array
blkdiag Block diagonal concatenation
cat Concatenate arrays
cross Vector cross product
cumprod Cumulative product
cumsum Cumulative sum
diag Diagonal matrices and diagonals of matrix
dot Vector dot product
end Last index
find Find indices of nonzero elements
fliplr Flip matrices left-right
flipud Flip matrices up-down
flipdim Flip matrix along specified dimension
horzcat Horizontal concatenation
ind2sub Multiple subscripts from linear index
ipermute Inverse permute dimensions of multidimensional array
kron Kronecker tensor product
max Maximum elements of array
min Minimum elements of array
permute Rearrange dimensions of multidimensional array
prod Product of array elements
repmat Replicate and tile array
reshape Reshape array
rot90 Rotate matrix 90 degrees
sort Sort elements in ascending order
sortrows Sort rows in ascending order
sum Sum of array elements
sqrtm Matrix square root
sub2ind Linear index from multiple subscripts
tril Lower triangular part of matrix
triu Upper triangular part of matrix
vertcat Vertical concatenation

See also Linear Algebra for other matrix operations.

See also Elementary Math for other array operations.

Elementary Matrices and Arrays

: (colon) Regularly spaced vector
blkdiag Construct block diagonal matrix from input arguments
diag Diagonal matrices and diagonals of matrix
eye Identity matrix
freqspace Frequency spacing for frequency response
linspace Generate linearly spaced vectors
logspace Generate logarithmically spaced vectors
meshgrid Generate X and Y matrices for three-dimensional plots
ndgrid Arrays for multidimensional functions and interpolation
ones Create array of all ones
rand Uniformly distributed random numbers and arrays
randn Normally distributed random numbers and arrays
repmat Replicate and tile array
zeros Create array of all zeros

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

  Mathematics Linear Algebra