MATLAB Function Reference    

Elementary Math


acos Inverse cosine
acosh Inverse hyperbolic cosine
acot Inverse cotangent
acoth Inverse hyperbolic cotangent
acsc Inverse cosecant
acsch Inverse hyperbolic cosecant
asec Inverse secant
asech Inverse hyperbolic secant
asin Inverse sine
asinh Inverse hyperbolic sine
atan Inverse tangent
atanh Inverse hyperbolic tangent
atan2 Four-quadrant inverse tangent
cos Cosine
cosh Hyperbolic cosine
cot Cotangent
coth Hyperbolic cotangent
csc Cosecant
csch Hyperbolic cosecant
sec Secant
sech Hyperbolic secant
sin Sine
sinh Hyperbolic sine
tan Tangent
tanh Hyperbolic tangent


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
reallog Natural logarithm for nonnegative real arrays
realpow Array power for real-only output
realsqrt Square root for nonnegative real arrays
sqrt Square root


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

Rounding and Remainder

fix Round towards zero
floor Round towards minus infinity
ceil Round towards plus infinity
round Round towards nearest integer
mod Modulus after division
rem Remainder after division
sign Signum

Discrete Math (e.g., Prime Factors)

factor Prime factors
factorial Factorial function
gcd Greatest common divisor
isprime True for prime numbers
lcm Least common multiple
nchoosek All combinations of N elements taken K at a time
perms All possible permutations
primes Generate list of prime numbers
rat, rats Rational fraction approximation

  Linear Algebra Data Analysis and Fourier Transforms