Matlab Commands
Matlab Commands
Array Commands
length Computers number of elements.
max Returns largest element.
min Returns smallest element.
prod Product of each column.
size Computes array size.
sort Sorts each column.
sum Sums each column.
Special Matrices
eye Creates an identity matrix.
ones Creates an array of ones.
zeros Creates an array of zeros.
Matrix Arithmetic
cross Computes cross products.
dot Computes dot products.
Matrix Commands for Solving Linear Equations
det Computes determinant of an array.
inv Computes inverse of a matrix.
pinv Computes pseudo inverse of a matrix.
rank Computes rank of a matrix.
Plotting Commands
Programming
Mathematical Functions
Trigonometric Functions
acos(x) Inverse cosine; arcos x = cos –1 (x).
acot(x) Inverse cotangent; arccot x = cot –1(x).
acsc(x) Inverse cosecant; arcs x = csc –1 (x).
asec(x) Inverse secant; arcsec x = sec –1 (x).
asin(x) Inverse sine; arcsin x = sin –1 (x).
atan(x) Inverse tangent; arctan x = tan –1 (x).
cos(x) Cosine; cos(x).
cot(x) Cotangent; cot(x).
csc(x) Cosecant; csc(x).
sec(x) Secant; sec(x).
sin(x) Sine; sin(x).
tan(x) Tangent; tan(x).
Hyperbolic Functions
acosh(x) Inverse hyperbolic cosine; cosh –1 (x).
acoth(x) Inverse hyperbolic cotangent; coth –1 (x).
acsch(x) Inverse hyperbolic cosecant; csch –1 (x).
asech(x) Inverse hyperbolic secant; sech –1 (x).
asinh(x) Inverse hyperbolic sine; sinh –1 (x).
atanh(x) Inverse hyperbolic tangent; tanh –1 (x).
cosh(x) Hyperbolic cosine; cosh(x).
coth(x) Hyperbolic cotangent; cosh(x)/sinh(x).
csch(x) Hyperbolic cosecant; 1/sinh(x).
sech(x) Hyperbolic secant; 1/cosh(x).
sinh(x) Hyperbolic sine; sinh(x).
tanh(x) Hyperbolic tangent; sinh(x)/cosh(x).
Complex Functions
abs(x) Absolute value; |x|.
angle(x) Angle of a complex number x.
conj(x) Complex conjugate of x.
imag(x) Imaginary part of a complex number x.
real(x) Real part of a complex number x.
Numerical Methods