MATLAB Built-in Functions

Several functions are built into MATLAB.


Description

Mathematical Functions

Name

Meaning

abs(x)

absolute value

ceil(x)

round toward positive infinity

exp(x)

exponentiation

factorial(x)

factorial

fix(x)

round toward 0

floor(x)

round toward negative infinity

log(x)

natural logarithm

log10(x)

base-10 logarithm

mod(x,d)

modulo of x divided by d

nthroot(x,n)

nth root of x

round(x)

round to integer

sqrt(x)

square root

Trig Functions

Name

Meaning

sin

sine

cos

cosine

tan

tangent

cot

cotangent

sec

secant

csc

cosecant

asin

inverse sine

acos

inverse cosine

atan

inverse tangent

acot

inverse cotangent

asec

inverse secant

acsc

inverse cosecant

sinh

hyperbolic sine

cosh

hyperbolic cosine

tanh

hyperbolic tangent

coth

hyperbolic cotangent

sech

hyperbolic secant

csch

hyperbolic cosecant

asinh

inverse hyperbolic sine

acosh

inverse hyperbolic cosine

atanh

inverse hyperbolic tangent

acoth

inverse hyperbolic cotangent

asech

inverse hyperbolic secant

acsch

inverse hyperbolic cosecant

Matrix Functions

Name

Meaning

diag(v)

diagonal matrix from vector v

diag(m)

diagonal vector from matrix m

eye(n)

n x n identity matrix

ones(n)

n x n matrix of 1s

zeros(n)

n x n matrix of 0s


CategoryRicottone