Grammar and Imbedded Control

#define

Define
constant for conditional #ifdef

#else

Else for conditional
#ifdef/#ifndef

#endif

End statement for #ifdef or
#ifndef

#ifdef

Conditional if (True) for
compile

#ifndef

Conditional if (False) for
compile

break

Break out of loop( for, do,
while, switch)

case

Part of switch statement

char

Data type(8 bits) for ASCII
strings definition

colSize

Returns column size

complex

Real and Imag. data type
(64bit floats)

const

Definition of read only
constants

continue

Continue with a loop (for,
do, while)

default

Part of switch statement

dialog

Generic Dialog Procedure

do while

The do while statement

double

Real data type (64bit
float)

echof

Same as printf, but to
display monitor also

else

False part of if statement

exit

Terminate shell with
message

float

Real data type (64bit
float)

for

First part of for loop

if

Conditional statement

int

Fixed data type (32bit,
signed)

long

Fixed data type (32bit,
signed)

matcmplx

Matrix of complex data
types

matrix

Matrix of double data types

pause

Output message to display
monitor and pause

printf

printf statement (as
standard in C)

Print

Print of Matrix/Vector
(Real/Complex arrays)

return

Return from user subroutine

rowSize

Returns row size

Sizeof

Returns size of array in
type elements

sprintf

sprintf statement (as
standard in C)

switch

First part of complex
multiple if/else

veccmplx

Vector of complex data types

vector

Vector of double data types

void

The void return type

while

The while statement



Mathematical Functions

abs

Absolute value

acos

Inverse cosine

acosh

Inverse hyperbolic cosine

arg

Angle of

asin

Inverse sine

asinh

Inverse hyperbolic sine

atan

Inverse tangent

atanh

Inverse hyperbolic tangent

atan2

Inverse tangent y, x

ceil

Rounds up to nearest
integer

cmplx

Complex number of

conj

Complex conjugate

cos

Cosine

cosh

Hyperbolic cosine

exp

Exponential

expM

Matrix Exponential

fabs

Absolute value (for real
argument)

floor

Rounds down to nearest
integer

fmod

Modulo function

imag

Imaginary part of complex
number

ln

Natural logarithm

log

Natural logarithm

log10

Logarithm base 10

log2

Logarithm base 2

max

Maximum function

min

Minimum function

norm

Square of

polar

Complex of magnitude and
angle

pow

Power x of y

real

Real part of complex num.

round

Round to nearest integer

sigNum

The Signum function

sin

Sine

sinh

Hyperbolic sine

sqrt

Square root

tan

Tangent

tanh

Hyperbolic tangent



Special Mathematical Functions

besselIn

Bessel function In(x), n =
0,1,2...

besselJn

Bessel function Jn(x), n =
0,1,2,...

besselKn

Bessel function Kn(x), n =
0,1,2,...

besselYn

Bessel function Yn(x), n =
0,1,2,...

beta

Beta function B(z,w)

betaI

Incomplete beta function
Ix(a,b)

cosint

Cosine Integral function

ellipticC

Elliptic Integral of 1st
kind

ellipticJ

Jacobian Elliptic function

ellipticS

Elliptic Integral of 2nd
kind

erf

Error function erf(x)

erfc

Complementary of error
function erf(x)

expi

Exponental Integral Ei(x)

expn

Exponental Integral En(x)

factorial

Factorial function

gamma

Gamma function

gammaln

Natural log of gamma(x)

gammaP

Incomplete gamma function
P(a,x)

gammaQ

Incomplete gamma function
Q(a,x)

sinint

Sine Integral function



Random Numbers and Distributions

chisqrPDF

Chisquared distribution (Central)

chisqrProb

Chisquared probabilities
(Central)

chisqr2PDF

Chisquared distribution
(Noncentral)

chisqr2Prob

Chisquared probabilities
(Noncentral)

F PDF

F Distribution (Central)

F_Prob

F probabilities (Central)

normal

Gaussian noise generation
(vector/matrix)

normalPDF

Normal(Gaussian) Distribution

normalProb

Probabilities from a
Gaussian PDF

rand

Uniform Random number
generators

randn

Gaussian number

rayleighPDF

Rayleigh Distribution of a
random variable

rayleighProb

Rayleigh probabilities

ricianPDF

Rician Distribution of a
random variable

ricianProb

Rician probabilities

srand

Initialize randf with seed

uniform

White noise generation (vector/matrix)



Matrix/Vector Operations

cod

Complete Orthogonal
Decomposition

chol

Cholesky factorization

det

Matrix Determinant

eig

Matrix
Eigenvalues/Eigenvectors

expM

Matrix Exponential

hess

Hessenburg Decomposition

inv

Matrix Inverse

kron

Calculates the Kronecker
tensor product

kurt

Calculates kurtosis of
vector

linequ

Matrix linear equation
solver

linequOD

Matrix equation solver
(over determined)

lsq

Least squares fit

lu

Matrix LU factorization

'

The matrix transpose
operator

.^

The matrix/vector power
operator

*

The Matrix Product operator

norms

Matrix/Vector norms

pinv

MoorePenrose pseudoinverse
of a matrix

qr

QR Decomposition

rank

Rank of a Matrix

rcond

Matrix reciprocal condition
number

rref

Reduced row echelon form

schur

Schur Matrix Decomposition

skew

Calculates skewness of
vector

svd

Singular value
Decomposition

toeplitz

Generates a Toeplitz matrix



Matrix/Vector Auxiliary Functions

casting ops

Convert matrix/vector to
vector/matrix

cmplx

Create complex matrix or
complex vector

colLen

Column size of a matrix
(length)

colSize

Column dimension of a
matrix

convToA

Matrix/Vector elements to
array elements

copyV

Copy a portion of a vector
to a new vector

diag

Diagonal of Matrix and
Diagonal Matrices

dnSamp

Down sample a matrix or
vector

expM

Matrix Exponential

expand

Matrix/Vector expansion

even

Even function

eye

Square matrix to singular
type

flip

Reverse elements function

matGen

Generate Matrix Sequence

matLin

Generate Matrix Sequence

odd

Odd function

ones

Generate 1’s matrix or
vector

Print

Matrix/Vector print

reduce

Matrix reduction

reshape

Matrix shaping

resizeM

Matrix resize

resizeV

Vector resize

rotM

Matrix rotation

rowLen

Row size of a matrix
(length)

rowSize

Row dimension of a matrix

sigNum

The Signum function for
real matrices/vectors

sort

Sort a vector in ascending
order

sortRows

Sort matrix rows on column
specification

trace

Sum of diagonal elements of
a matrix

triL

Lower triangular part of
matrix

triU

Upper triangular part of
matrix

upSamp

Up sample a matrix or
vector

vecGen

Generate Vector Sequence

vecLin

Generate Vector Sequence

vecLog

Generate Vector Logarithmic
Sequence

zero

Zeros elements of matrix or
vector

zeros

Generate zero matrix or
vector

zeros3D

Generate 3D zero matrix or
vector



Special Matrices

compan

Companion matrix


gallery

Wilson/Rosser matrices


hadamard

Hadamard matrix


hankel

Hankel matrix


hilb

Hilbert matrix


magic

Magic matrix


pascal

Pascal matrix


toeplitz

Toeplitz matrix


vander

Vandermonde matrix


wilkinson

Wilkinson test matrix








Digital Filters

butterF

Butterworth Filter Design

chebyIF

Chebyshev I Filter Design

chebyIIF

Chebyshev II Filter Design

elliptF

Elliptic Filter Design

filtadj

Filter section gain
adjustment

filter

Vector filter function in
direct form

filterD

General filter function

firpm

Parks McCellan FIR filter
Design with vectors

firwin

FIR Windowed Filter Design
with vectors

firwindF

FIR Windowed Filter Design

gainF

Complex gain over range

groupD

Group Delay over range

hogSym

Hogenauer Filter Design

iifixedR

IIR Fixed Point
Coefficients Response

impulseF

Impulse Response

interpFIR

Interpolated multiFIR
Filter design

MaxFlat

MaxFlat FIR Symmetric
Filter design

meteorFIR

FIR constraint based design

ParksMc

Parks McCellan FIR Filter
Design

phaseF

Complex phase over range

SavGov

SavitzkyGolay Smoothing Filter

stepF

Step Response

unwrap

Phase unwrap



Spectral Analysis

blackharrisW

4term Blackman harris
window

blackWin

Blackman window

chebyWin

DolphChebyshev window

chirpZ

Chirp Z transform

dct

Discrete Cosine Transform
(DCT)

dct2

Twodimensional DCT

dft

Discrete Fourier Transform
(DFT)

fft

Fast Fourier Transform(FFT)

fft2

Twodimensional FFT

fftshift

Shift zero freq. of FFT to
center of spectrum

gaussianWin

Gaussian window

hammWin

Hamming window

hannWin

Hanning window

hilbert

Hilbert transform

idct

Inverse Discrete Cosine
Transform (DCT)

idct2

Inverse twodimensional DCT

idft

Inverse Discrete Fourier
Transform (IDFT)

ifft

Inverse FFT

ifft2

Inverse of twodimensional
FFT

kaiserWin

Kaiser window

normal

Gaussian noise generation

rand

Random number generators

taprectWin

Tappered rectangular window

triangWin

Triangular window

uniform

White noise generation



Correlation/Convolution

autocor

The Auto Correlation
function

autocorMat

Generates the
Autocorrelation matrix

autocovar

The Auto Covariance
function

autocovarMat

Generates the Autocovariance
matrix

cepstralC

LPC coefficients to
Cepstral Coefficients

conv

The Convolve function

convMat

Computes the convolution
matrix

corCoef

Calculates the correlation
coefficient

crosscor

The Cross Correlation function

crosscovar

The Cross Covaraince
function

lar2rc

Log area ratio;s to
reflection coefficients

LevDurbin

The LevinsonDurbin
Recursion

LevRecur

The Levinson Recursion

lineSpec

Line Spectral Pairs from
LPC coefficients

rc2lar

Reflection coefficients to
Log Area Ratios



Signal Processing Toolbox

bilinear

Bilinear transform

butterAF

Butterworth analog filter
design

butterAP

Butterworth analog
prototype

butterORD

Butterworth filter order
calculation

cas2dir

Secondorder cascade to
direct form

casfilter

Secondorder cascade filter

cheby1AF

ChebyshevI analog filter
design

chebyIAP

Chebyshev I analog
prototype

chebyIDF

Chebyshev I digital filter
design

cheby1ORD

ChebyshevI filter order
calculation

cheby2AF

Chebyshev II analog filter
design

cheby2AP

Chebyshev II analog
prototype

Cheby2DF

Chebyshev II digital filter
design

cheby2ORD

ChebyshevII filter order
calculation

circonv

Circular convolution

circonvt

Circular convolution
(timedomain)

cirFold

Circular folding of a
sequence

cirshift

Circular shift of samples
in time domain

dfs

Compute discrete Fourier
Series Coefficients

dir2cas

Direct form of filter to
secondorder sections

dir2fs

Direct form of filter to
frequency form

dir2par

Direct form of filter to
parallel 2^{nd} order

ellipticAF

Elliptic analog filter
design

ellipticAP

Elliptic analog prototype

ellipticDF

Elliptic digital filter
design

ellipticORD

Elliptic filter order
calculation

evenodd

Signal decomposition to
even/odd parts

freqS

Frequency response of
analog filters

freqZ

Frequency response of
digital filters

FIR2Lat

Direct form of FIR filter
to allzero Lattice form

FIRIIR2Lat

Direct form of all
pole/zero IIR filter to Lattice/Latter form

groupDelay

Group delay calculation

IIR2Lat

Direct form of IIR filter
to lattice IIR form

impseq

Impulse sequence generation

imp_invr

Impulse invariance
transformation

Lat2FIR

Allzero Lattice form to
FIR direct form conversion

Lat2IIR

Lattice IIR form to IIR
direct form conversion

Lat2FIRIIR

Lattice/Ladder form to
pole/zero direct form conversion

LatFiltIIR

Lattice/Ladder module to
filter input sequence

LatFilt

Allzero Lattice filter

ovrlpsav

Overlapsave method of
block convolution

par2dir

Parallel 2^{nd}
order form to direct filter form

residueZ

Ztransform partial
fraction expansion

sdir2cas

Direct form of filter to 2^{nd}
order for sdomain

sigadd

Signal addition

sigmult

Signal multiplication

sigshift

Signal shift

sinc

Sinc signal generation

STrans

Prototype frequency band
transformation

Smapping

Analog frequency band
transformation

stepseq

Step sequence generation

Zmapping

Digital frequency band
transformation



Statistical and Adaptive Signal Processing Toolbox

AllPoleCor

All Pole Signal Model using
the AutoCorrelation Method

AllPoleCovar

All Pole Signal Model using
the Covariance Method

AllPoleModCovar

All Pole Signal Model using
the Modified Covariance Method

apa

Affine Projection
Algorithm. for an adaptive FIR filter

BTpds

Computes the BlackmanTukey
Periodogram

cma1

Constant Modulus Algorithm (CMA12)
for an adaptive FIR filter

cma2

Constant Modulus Algorithm
(CMA22) for an adaptive FIR filter

convMat

Computes the convolution
matrix

covarMat

Computes the covariance
matrix

Covarpds

The Covariance Method for Power
Density Spectrum

EigVecpds

The Eigenvector Method for
Power Density Spectrum

fastAlg

The Fast Array algorithm
for an adaptive FIR filter

fbnlms

The fast Block (FFT) NLMS
algorithm for an adaptive FIR filter

harrisPDS

Computes a Periodogram
using the Window Overlap Method

LevDurbin

The LevinsonDurbin
Recursion

LevRecur

The Levinson Recursion

lms

The LMS Algorithm for an
adaptive FIR filter

LSIfilter

FIR Least Squares Inverse
Filter

MUSICpds

The MUSIC Algorithm for
Power Density Spectrum

MinNormpds

The Minimum Norm Algorithm
for Power Density Spectrum

ModCovarpds

The Modified Covariance
Method for Power Density Spectrum

nlms

The Normalized LMS Algorithm
for an adaptive FIR filter

pnlms

The NLMS Alg. with power
normalization

rca

The ReducedConstellation
Algorithm (RCA) for an adaptive FIR filter

rls

The Exponentially Weighted
RLS Algorithm for an adaptive FIR filter

selms

The SignError LMS
Algorithm for an adaptive FIR filter

steepestD

The Steepest Descent
Algorithm for an adaptive FIR filter

Welchpds

Computes the Modified or
Welch Periodogram

wienerF

The Wiener FIR filter

YuleWalkerpds

Computes the YuleWalker
Power Density Spectrum



Control Engineering Toolbox

ackerMan

State feedback gain matrix
calculation

bodeSS

Bode plot data from
Statespace

bodeTF

Bode plot data from
transfer function

feedbackTF

Feedback transfer functions
connection

gainTF

Gain to force step function
to zero dB

gridRL

Plot RootLocus grid

impulseSS

Impulse response from
Statespace

impulseTF

Impulse response from
transfer function

INITsysSS

Statespace response to
initial condition

LTIsysSS

Statespace response from
arbitrary input

LTIsysTF

Transfer func. response from arbitrary input

margin

Gain and Phase margins from
Bode plot

NicholsChart

Plot of Nichols Chart

NicholsTF

Nyquist locus plotted on
Nichols Chart

nyquistPolar

Nyquist plot data for Polar
Plot

nyquistSS

Nyquist plot data from
statespace

nyquistTF

Nyquist plot data from
transfer function

parallelTF

Parallel transfer functions
connection

PZtoSS

Polezero to statespace

PZtoTF

Polezero to transfer
function

residueS

Partial fraction expansion
from transfer func.

rlocusSS

Rootlocus plot from
statespace

rlocusTF

Rootlocus plot from
transfer function

RootLocusEnable

Enable rootlocus cursor
readout

secondOrdSys

Computes a second order
transfer function

seriesTF

Series transfer functions
connection

SStoPZ

Statespace to polezero

SStoTF

Statespace to transfer
function

stepSS

Step response from
statespace

stepTF

Step response from transfer
function

TFtoPZ

Transfer function to
polezero

TFtoSS

Transfer function to
statespace



Polynomials

chebyNodes

Chebyshev nodes over
interval

chebypol

Chebyshev interpolating
polynomial

lagrange

Lagrange interpolating
polynomial

poly

Polynomial coefficients
from its roots

polyC

Characteristic polynomial
of square matrix

polyD

Polynomial derivative

polyDiv

Polynomial division

polyFit

Polynomial curve fit

polyM

Polynomial multiplication
for vector input

polyR

Roots of polynomial for
vector input

polyV

Value of polynomial for
vector input

proots

Roots of polynomial



Curve Fitting

interpL

Data interpolation with
Lagrange approximation

interpS

Data interpolation using
natural cubic splines

lsqLine

Least Squares Fit by data
Linearization

polyFit

Polynomial curve fit

spline

Cubic Spline Interpolation



Statistics

delTime

Measures execution times to
within 1 msec.

cumsum

Cumulative sum

cumprod

Cumulative product

max

Maximum value of array
elements

maxI

Max. value index of array
elements

mean

Mean value of array
elements

min

Minimum value of array
elements

minI

Min. value index of array
elements

sum

Summation of array elements

var

Variance of array elements



Differential Equations and Numerical
Integration

abmODE

AdamsBashforthMoultin
Method

hamODE

Hamming Method

msmODE

MilneSimpson Method

rkf45

RungeKuttaFehlberg Method

sysODE

System of Equations ODE
solver, 4^{th} order RungeKutta

sysODE2

System of Equations ODE
solver, 5^{th} order
RungeKutta

lsmBVP

Linear Shooting Method
B.V.P.

rombI

Romberg Integration

simpI

Integration by Simpson's
rule

diffExt

Differentiation of F(x)

diffExt2

Partial differentiation of
F(x,y)



NonLinear Numerical Methods

fmin

Local minimum of function
f(x)

fmins

Local minimum of function
f(x,y,z, ... )



File I/O and String Functions

atof

Convert ASCII string to
floating point value

atoi

Convert ASCII string to
integer (long) value

close

Close file

coordTextFile

Read Coordinate Text File
format to matrix

getc

Get first ASCII character
from ASCII buffer

open

Open file

read

Read file to array(int,
float, complex)

readM

Read file to matrix type

readV

Read file to vector type

readExcel

Read Excel data to matrix

readLine

Read ASCII line to
character buffer

rewind

Rewind file

skip

Skip data elements in file

skipLines

Skip lines in ASCII opened
file

sprintf

sprintf statement (as
standard in C)

strcat

String catenation

strchr

Search string for a
character

strcpy

String copy function

strcmp

String compare function

strlen

String length function

strstr

String subcompare

write

Write data to file



Plotting Routines

arrowP

Plot arrow, x/y plot

aspectR

Aspect ratio for x/y plots

axisS

Axis style, x/y plot

camloc3D

Camera location  3D plot

closePlot

Close plot

color3D

Set color value in palette

colorB

Background color

colorBar

Color palette selection 
3D plot

colorT

Text color, x/y plot

confil3D

Specifications for contour
fill mode

conlab3D

Options for 3D contour
labels

consurf3D

3D contour and/or surface
plot

contourP

Contour x/y plot with color
mapping

contour

A line Contour x/y plot

grid

Plot grid lines, x/y plot

gridH

Plot horizontal grid lines,
x/y plot

histoP

Histogram plot

linethick3C

Line thickness for 3D line
plot (plot3C)

movieP

Set movie mode for multi
xy plots

openPlot

Open plot

opts3D

Options for 3D plot

pause

Pause for keyboard or mouse
input

pCRT

Output plot to the display
monitor

penS

Pen style, x/y plot

ploglog

Plot x and y array on log
scale

plogxy

Plot x array on log scale,
y linear

plot3C

Plot x/y/z curve(s) in 3D

plotx

Plot x array

plotxy

Plot x and y arrays

ploty

Plot y array

pminmax

Set min/max for x/y axes

pminmax3D

Set min/max for x/y/z axes

polarP

Polar plot

polarPdb

Polar plot  dB

polezeroP

PoleZero plot

pPrint

Output plot to printer

ptext

Plot text string, x/y plot
at x/y point

Ptext3C

Plot text string, x/y/z 3D
plot (plot3C)

Ptics

Force selection of number
of tic marks

pxlogy

Plot y array on log scale,
x linear

stripsP

Plot y array as strip chart

surfil3D

Specifications for surface
fill mode

surwir3D

Specifications for wire
mesh mode

Title

Plot Title Label, x/y plot

vectorP

Vector gradient plot

waterFallP

3D waterfall plot

xLabel

Plot xlabel

yLabel

Plot ylabel

zLabel

Plot zlabel
