Using the C++ Math Library    

Elementary Matrices and Matrix Manipulation

Elementary Matrices 
Function
Purpose
eye
Identity matrix.
linspace
Linearly spaced vector.
logspace
Logarithmically spaced vector.
meshgrid
X and Y arrays for 3-D plots.
ones
Matrix of 1's.
rand
Uniformly distributed random numbers.
randn
Normally distributed random numbers.
zeros
Matrix of 0's.

Basic Array Information 
Function
Purpose
disp
Display text or matrix
isempty
True for empty matrix.
isequal
True for input arrays of the same type, size, and contents.
islogical
True for logical arrays.
isnumeric
True for numeric arrays.
length
Length of vector.
logical
Convert numeric values to logical values.
ndims
Number of dimensions (always 2).
size
Size of matrix.

Matrix Manipulation 
Function
Purpose
cat
Concatenate arrays.
diag
Create or extract diagonals.
fliplr
Flip matrix in the left/right direction.
flipud
Flip matrix in the up/down direction.
ipermute
Inverse of permute.
permute
Permute array dimensions.
repmat
Replicate and tile an array.
reshape
Change size.
rot90
Rotate matrix 90 degrees.
shiftdim
Shift dimensions.
tril
Extract lower triangular part.
triu
Extract upper triangular part.

Special Constants 
Function
Purpose
computer
Computer type.
eps
Floating-point relative accuracy.
flops
Floating point operation count. (Not reliable in stand-alone applications.)
inf
Infinity.
nan
Not-a-Number.
pi
3.1415926535897....
realmax
Largest floating-point number.
realmin
Smallest floating-point number.

Specialized Matrices 
Function
Purpose
compan
Companion matrix.
hadamard
Hadamard matrix.
hankel
Hankel matrix.
hilb
Hilbert matrix.
invhilb
Inverse Hilbert matrix.
magic
Magic square.
pascal, pascal_func
Pascal matrix.
rosser
Classic symmetric eigenvalue test problem.
toeplitz
Toeplitz matrix.
vander
Vandermonde matrix.
wilkinson
Wilkinson's eigenvalue test matrix.


 Operators and Special Functions Elementary Math Functions