Documentation

Signal Processing Toolbox Functions

Signal Generation and Preprocessing

Smoothing and Denoising

detrend Remove linear trends
medfilt1 1-D median filtering
sgolay Savitzky-Golay filter design
sgolayfilt Savitzky-Golay filtering

Resampling

decimate Decimation — decrease sampling rate
downsample Decrease sampling rate by integer factor
interp Interpolation — increase sampling rate by integer factor
pchip Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
resample Resample uniform or nonuniform data to new fixed rate
spline Cubic spline data interpolation
upfirdn Upsample, apply FIR filter, and downsample
upsample Increase sampling rate by integer factor

Waveform Generation

chirp Swept-frequency cosine
diric Dirichlet or periodic sinc function
gauspuls Gaussian-modulated sinusoidal pulse
gmonopuls Gaussian monopulse
pulstran Pulse train
randn Normally distributed random numbers
rectpuls Sampled aperiodic rectangle
sawtooth Sawtooth or triangle wave
sin Sine of argument in radians
sinc Sinc function
square Square wave
tripuls Sampled aperiodic triangle
vco Voltage controlled oscillator
buffer Buffer signal vector into matrix of data frames
demod Demodulation for communications simulation
modulate Modulation for communications simulation
seqperiod Compute period of sequence
shiftdata Shift data to operate on specified dimension
unshiftdata Inverse of shiftdata
strips Strip plot
udecode Decode 2n-level quantized integer inputs to floating-point outputs
uencode Quantize and encode floating-point inputs to integer outputs
marcumq Generalized Marcum Q function

Measurements and Feature Extraction

Descriptive Statistics

cummax Cumulative maximum
cummin Cumulative minimum
findpeaks Find local maxima
max Largest elements in array
meanfreq Mean frequency
medfreq Median frequency
min Smallest elements in array
peak2peak Maximum-to-minimum difference
peak2rms Peak-magnitude-to-RMS ratio
rms Root-mean-square level
rssq Root-sum-of-squares level
std Standard deviation
var Variance
sptool Open interactive digital signal processing tool

Pulse and Transition Metrics

dutycycle Duty cycle of pulse waveform
midcross Mid-reference level crossing for bilevel waveform
pulseperiod Period of bilevel pulse
pulsesep Separation between bilevel waveform pulses
pulsewidth Bilevel waveform pulse width
statelevels State-level estimation for bilevel waveform with histogram method
falltime Fall time of negative-going bilevel waveform transitions
overshoot Overshoot metrics of bilevel waveform transitions
risetime Rise time of positive-going bilevel waveform transitions
settlingtime Settling time for bilevel waveform
slewrate Slew rate of bilevel waveform
undershoot Undershoot metrics of bilevel waveform transitions
sptool Open interactive digital signal processing tool

Spectral Measurements

bandpower Band power
enbw Equivalent noise bandwidth
meanfreq Mean frequency
medfreq Median frequency
obw Occupied bandwidth
powerbw Power bandwidth
tfestimate Transfer function estimate
sfdr Spurious free dynamic range
sinad Signal to noise and distortion ratio
snr Signal-to-noise ratio
thd Total harmonic distortion
toi Third-order intercept point

Correlation and Convolution

xcorr Cross-correlation
xcorr2 2-D cross-correlation
corrmtx Data matrix for autocorrelation matrix estimation
xcov Cross-covariance
cconv Modulo-N circular convolution
conv Convolution and polynomial multiplication
convmtx Convolution matrix

Digital and Analog Filters

Digital Filter Design

designfilt Design digital filters
digitalFilter Digital filter
info Information about digital filter
butter Butterworth filter design
buttord Butterworth filter order and cutoff frequency
cheby1 Chebyshev Type I filter design
cheb1ord Chebyshev Type I filter order
cheby2 Chebyshev Type II filter design
cheb2ord Chebyshev Type II filter order
ellip Elliptic filter design
ellipord Minimum order for elliptic filters
polyscale Scale roots of polynomial
polystab Stabilize polynomial
impinvar Impulse invariance method for analog-to-digital filter conversion
yulewalk Recursive digital filter design
cfirpm Complex and nonlinear-phase equiripple FIR filter design
fir1 Window-based FIR filter design
fir2 Frequency sampling-based FIR filter design
fircls Constrained least square, FIR multiband filter design
fircls1 Constrained least square, lowpass and highpass, linear phase, FIR filter design
firls Least square linear-phase FIR filter design
firpm Parks-McClellan optimal FIR filter design
firpmord Parks-McClellan optimal FIR filter order estimation
gaussdesign Gaussian FIR pulse-shaping filter design
intfilt Interpolation FIR filter design
kaiserord Kaiser window FIR filter design estimation parameters
maxflat Generalized digital Butterworth filter design
rcosdesign Raised cosine FIR pulse-shaping filter design
sgolay Savitzky-Golay filter design
fdatool Open Filter Design and Analysis Tool
fvtool Open Filter Visualization Tool
sptool Open interactive digital signal processing tool

Digital Filter Analysis

angle Phase angle
freqz Frequency response of digital filter
grpdelay Average filter delay (group delay)
phasedelay Phase delay of digital filter
phasez Phase response of digital filter
zerophase Zero-phase response of digital filter
zplane Zero-pole plot
impz Impulse response of digital filter
impzlength Impulse response length
stepz Step response of digital filter
fdatool Open Filter Design and Analysis Tool
fvtool Open Filter Visualization Tool
sptool Open interactive digital signal processing tool
filtord Filter order
filternorm 2-norm or infinity-norm of digital filter
firtype Type of linear phase FIR filter
isallpass Determine whether filter is allpass
isfir Determine if digital filter has finite impulse response
islinphase Determine whether filter has linear phase
isminphase Determine whether filter is minimum phase
ismaxphase Determine whether filter is maximum phase
isstable Determine whether filter is stable

Digital Filtering

fftfilt FFT-based FIR filtering using overlap-add method
filter Filter data with recursive (IIR) or nonrecursive (FIR) filter
filtfilt Zero-phase digital filtering
filtic Initial conditions for transposed direct-form II filter implementation
latcfilt Lattice and lattice-ladder filter implementation
medfilt1 1-D median filtering
residuez Z-transform partial-fraction expansion
sgolayfilt Savitzky-Golay filtering
sosfilt Second-order (biquadratic) IIR digital filtering
cell2sos Convert second-order sections cell array to matrix
dspfwiz Open FDATool Realize Model panel to create Simulink filter block
eqtflength Equalize lengths of transfer function's numerator and denominator
filt2block Generate Simulink filter block
latc2tf Convert lattice filter parameters to transfer function form
sos2cell Convert second-order sections matrix to cell array
sos2ss Convert digital filter second-order section parameters to state-space form
sos2tf Convert digital filter second-order section data to transfer function form
sos2zp Convert digital filter second-order section parameters to zero-pole-gain form
ss Convert digital filter to state-space representation
ss2sos Convert digital filter state-space parameters to second-order sections form
ss2tf Convert state-space representation to transfer function
ss2zp Convert state-space filter parameters to zero-pole-gain form
tf Convert digital filter to transfer function
tf2latc Convert transfer function filter parameters to lattice filter form
tf2sos Convert digital filter transfer function data to second-order sections form
tf2ss Convert transfer function filter parameters to state-space form
tf2zp Convert transfer function filter parameters to zero-pole-gain form
tf2zpk Convert transfer function filter parameters to zero-pole-gain form
zp2sos Convert zero-pole-gain filter parameters to second-order sections form
zp2ss Convert zero-pole-gain filter parameters to state-space form
zp2tf Convert zero-pole-gain filter parameters to transfer function form
zpk Convert digital filter to zero-pole-gain representation

Multirate Signal Processing

decimate Decimation — decrease sampling rate
downsample Decrease sampling rate by integer factor
interp Interpolation — increase sampling rate by integer factor
pchip Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
resample Resample uniform or nonuniform data to new fixed rate
spline Cubic spline data interpolation
upfirdn Upsample, apply FIR filter, and downsample
upsample Increase sampling rate by integer factor

Analog Filters

besself Bessel analog filter design
butter Butterworth filter design
cheby1 Chebyshev Type I filter design
cheby2 Chebyshev Type II filter design
ellip Elliptic filter design
freqs Frequency response of analog filters
bilinear Bilinear transformation method for analog-to-digital filter conversion
besselap Bessel analog lowpass filter prototype
buttap Butterworth filter prototype
cheb1ap Chebyshev Type I analog lowpass filter prototype
cheb2ap Chebyshev Type II analog lowpass filter prototype
ellipap Elliptic analog lowpass filter prototype
impinvar Impulse invariance method for analog-to-digital filter conversion
lp2bp Transform lowpass analog filters to bandpass
lp2bs Transform lowpass analog filters to bandstop
lp2hp Transform lowpass analog filters to highpass
lp2lp Change cutoff frequency for lowpass analog filter

Transforms

fft Fast Fourier transform
ifft Inverse fast Fourier transform
fftshift Shift zero-frequency component to center of spectrum
dftmtx Discrete Fourier transform matrix
czt Chirp Z-transform
goertzel Discrete Fourier transform with second-order Goertzel algorithm
hilbert Discrete-time analytic signal using Hilbert transform
dct Discrete cosine transform (DCT)
idct Inverse discrete cosine transform
fwht Fast Walsh-Hadamard transform
ifwht Inverse Fast Walsh-Hadamard transform
cceps Complex cepstral analysis
icceps Inverse complex cepstrum
rceps Real cepstrum and minimum phase reconstruction
abs Absolute value (magnitude)
angle Phase angle
bitrevorder Permute data into bit-reversed order
digitrevorder Permute input into digit-reversed order

Spectral Analysis

Nonparametric Methods

cpsd Cross power spectral density
mscohere Magnitude squared coherence
periodogram Periodogram power spectral density estimate
plomb Lomb-Scargle periodogram
pmtm Multitaper power spectral density estimate
pwelch Welch's power spectral density estimate
spectrogram Spectrogram using short-time Fourier transform
tfestimate Transfer function estimate
sptool Open interactive digital signal processing tool
db Convert energy or power measurements to decibels
db2mag Convert decibels to magnitude
db2pow Convert decibels to power
mag2db Convert magnitude to decibels
pow2db Convert power to decibels

Parametric Methods

pburg Autoregressive power spectral density estimate — Burg's method
pcov Autoregressive power spectral density estimate — covariance method
pmcov Autoregressive power spectral density estimate — modified covariance method
pyulear Autoregressive power spectral density estimate — Yule-Walker method
sptool Open interactive digital signal processing tool
db Convert energy or power measurements to decibels
db2mag Convert decibels to magnitude
db2pow Convert decibels to power
findpeaks Find local maxima
mag2db Convert magnitude to decibels
pow2db Convert power to decibels

Subspace Methods

peig Pseudospectrum using eigenvector method
pmusic Pseudospectrum using MUSIC algorithm
rooteig Frequency and power content using eigenvector method
rootmusic Root MUSIC algorithm

Windows

barthannwin Modified Bartlett-Hann window
bartlett Bartlett window
blackman Blackman window
blackmanharris Minimum 4-term Blackman-Harris window
bohmanwin Bohman window
chebwin Chebyshev window
flattopwin Flat top weighted window
gausswin Gaussian window
hamming Hamming window
hann Hann (Hanning) window
kaiser Kaiser window
nuttallwin Nuttall-defined minimum 4-term Blackman-Harris window
parzenwin Parzen (de la Vallée Poussin) window
rectwin Rectangular window
taylorwin Taylor window
triang Triangular window
tukeywin Tukey (tapered cosine) window
enbw Equivalent noise bandwidth
wintool Open Window Design and Analysis Tool
wvtool Open Window Visualization Tool
dpss Discrete prolate spheroidal (Slepian) sequences
dpssclear Remove discrete prolate spheroidal sequences from database
dpssdir Discrete prolate spheroidal sequences database directory
dpssload Load discrete prolate spheroidal sequences from database
dpsssave Discrete prolate spheroidal or Slepian sequence database

Spectral Measurements

bandpower Band power
enbw Equivalent noise bandwidth
meanfreq Mean frequency
medfreq Median frequency
obw Occupied bandwidth
powerbw Power bandwidth
tfestimate Transfer function estimate
sfdr Spurious free dynamic range
sinad Signal to noise and distortion ratio
snr Signal-to-noise ratio
thd Total harmonic distortion
toi Third-order intercept point

Signal Modeling

Autoregressive and Moving Average Models

arburg Autoregressive all-pole model parameters — Burg's method
arcov Autoregressive all-pole model parameters — covariance method
armcov Autoregressive all-pole model parameters — modified covariance method
aryule Autoregressive all-pole model parameters — Yule-Walker method
invfreqs Identify continuous-time filter parameters from frequency response data
invfreqz Identify discrete-time filter parameters from frequency response data
prony Prony method for filter design
stmcb Compute linear model using Steiglitz-McBride iteration

Linear Predictive Coding

ac2poly Convert autocorrelation sequence to prediction polynomial
ac2rc Convert autocorrelation sequence to reflection coefficients
is2rc Convert inverse sine parameters to reflection coefficients
lar2rc Convert log area ratio parameters to reflection coefficients
levinson Levinson-Durbin recursion
lpc Linear prediction filter coefficients
lsf2poly Convert line spectral frequencies to prediction filter coefficients
poly2ac Convert prediction filter polynomial to autocorrelation sequence
poly2lsf Convert prediction filter coefficients to line spectral frequencies
polyscale Scale roots of polynomial
poly2rc Convert prediction filter polynomial to reflection coefficients
rc2ac Convert reflection coefficients to autocorrelation sequence
rc2is Convert reflection coefficients to inverse sine parameters
rc2lar Convert reflection coefficients to log area ratio parameters
rc2poly Convert reflection coefficients to prediction filter polynomial
rlevinson Reverse Levinson-Durbin recursion
schurrc Compute reflection coefficients from autocorrelation sequence
corrmtx Data matrix for autocorrelation matrix estimation
xcorr Cross-correlation
xcov Cross-covariance
Was this topic helpful?