Navigation

Operators and Keywords

Function List:

C++ API

signal

Signal processing tools, including filtering, windowing and display functions.

Select category:

Signals

buffer
Buffer a signal into a data frame.
chirp
Evaluate a chirp signal at time T.
cmorwavf
Compute the Complex Morlet wavelet.
diric
Compute the dirichlet function.
gauspuls
Return the Gaussian modulated sinusoidal pulse.
gmonopuls
Return the gaussian monopulse.
mexihat
Compute the Mexican hat wavelet.
meyeraux
Compute the Meyer wavelet auxiliary function.
morlet
Compute the Morlet wavelet.
pulstran
Generate the signal y=sum(func(t+d,...)) for each d.
rectpuls
Generate a rectangular pulse over the interval [-W/2,W/2), sampled at times T.
sawtooth
Generates a sawtooth wave of period '2 * pi' with limits '+1/-1' for the elements of T.
shanwavf
Compute the Complex Shannon wavelet.
sigmoid_train
Evaluate a train of sigmoid functions at T.
specgram
Generate a spectrogram for the signal X.
square
Generate a square wave of period 2 pi with limits +1/-1.
tripuls
Generate a triangular pulse over the interval [-w/2,w/2), sampled at times t.

Filtering

filtfilt
Forward and reverse filter the signal.
filtic
Set initial condition vector for filter function The vector zf has the same values that would be obtained from function filter given past inputs x and outputs y
medfilt1
Apply a median filter of length N to the signal X.
movingrms
Calculate moving RMS value of the signal in X.
sgolayfilt
Smooth the data in x with a Savitsky-Golay smoothing filter of polynomial order p and length n, n odd, n > p.
sosfilt
Second order section IIR filtering of X.

Filter Analysis

freqs
Compute the s-plane frequency response of the IIR filter B(s)/A(s) as H = polyval(B,j*W)./polyval(A,j*W).
freqs_plot
Plot the amplitude and phase of the vector H.
fwhm
Compute peak full-width at half maximum (FWHM) or at another level of peak maximum for vector or matrix data Y, optionally sampled as y(x).
grpdelay
Compute the group delay of a filter.
impz
Generate impulse-response characteristics of the filter.
zplane
Plot the poles and zeros.

Filter Conversion

convmtx
If A is a column vector and X is a column vector of length N, then
polystab
b = polystab(a)
residued
Compute the partial fraction expansion (PFE) of filter H(z) = B(z)/A(z).
residuez
Compute the partial fraction expansion of filter H(z) = B(z)/A(z).
sos2tf
Convert series second-order sections to direct form H(z) = B(z)/A(z).
sos2zp
Convert series second-order sections to zeros, poles, and gains (pole residues).
ss2tf
Conversion from transfer function to state-space.
ss2zp
Converts a state space representation to a set of poles and zeros; K is a gain associated with the zeros.
tf2sos
Convert direct-form filter coefficients to series second-order sections.
tf2ss
Conversion from transfer function to state-space.
tf2zp
Convert transfer functions to poles-and-zero representations.
zp2sos
Convert filter poles and zeros to second-order sections.
zp2ss
Conversion from zero / pole to state space.
zp2tf
Converts zeros / poles to a transfer function.

IIR Filter Design

besselap
Return bessel analog filter prototype.
besself
Generate a Bessel filter.
bilinear
Transform a s-plane filter specification into a z-plane specification.
buttap
Design lowpass analog Butterworth filter.
butter
Generate a Butterworth filter.
buttord
Compute the minimum filter order of a Butterworth filter with the desired response characteristics.
cheb
Returns the value of the nth-order Chebyshev polynomial calculated at the point x.
cheb1ap
Design lowpass analog Chebyshev type I filter.
cheb1ord
Compute the minimum filter order of a Chebyshev type I filter with the desired response characteristics.
cheb2ap
Design lowpass analog Chebyshev type II filter.
cheb2ord
Compute the minimum filter order of a Chebyshev type II filter with the desired response characteristics.
cheby1
Generate a Chebyshev type I filter with RP dB of passband ripple.
cheby2
Generate a Chebyshev type II filter with RS dB of stopband attenuation.
ellip
Generate an elliptic or Cauer filter with RP dB of passband ripple and RS dB of stopband attenuation.
ellipap
Design lowpass analog elliptic filter.
ellipord
Compute the minimum filter order of an elliptic filter with the desired response characteristics.
iirlp2mb
IIR Low Pass Filter to Multiband Filter Transformation
impinvar
Converts analog filter with coefficients B and A to digital, conserving impulse response.
invimpinvar
Converts digital filter with coefficients B and A to analog, conserving impulse response.
ncauer
usage: [Zz, Zp, Zg] = ncauer(Rp, Rs, n)
pei_tseng_notch
Return coefficients for an IIR notch-filter with one or more filter frequencies and according (very narrow) bandwidths to be used with 'filter' or 'filtfilt'.
sftrans
Transform band edges of a generic lowpass filter (cutoff at W=1) represented in splane zero-pole-gain form.

FIR Filter Design

cl2bp
Constrained L2 bandpass FIR filter design.
fir1
Produce an order N FIR filter with the given frequency cutoff W, returning the N+1 filter coefficients in B.
fir2
Produce an order N FIR filter with arbitrary frequency response M over frequency bands F, returning the N+1 filter coefficients in B.
firls
FIR filter design using least squares method.
kaiserord
Return the parameters needed to produce a filter of the desired specification from a Kaiser window.
qp_kaiser
Computes a finite impulse response (FIR) filter for use with a quasi-perfect reconstruction polyphase-network filter bank.
remez
Parks-McClellan optimal FIR filter design.
sgolay
Computes the filter coefficients for all Savitzsky-Golay smoothing filters of order p for length n (odd).

Transforms

bitrevorder
Reorder the elements of the vector X in bit-reversed order.
cceps
Return the complex cepstrum of the vector X.
cplxreal
Split the vector z into its complex (ZC) and real (ZR) elements, eliminating one of each complex-conjugate pair.
czt
Chirp z-transform.
dct
Compute the discrete cosine transform of X.
dct2
Compute the 2-D discrete cosine transform of matrix X.
dctmtx
Return the DCT transformation matrix of size N-by-N.
dftmtx
Compute the N-by-N Fourier transformation matrix.
digitrevorder
Reorder the elements of the vector X in digit-reversed order.
dst
Computes the type I discrete sine transform of X.
dwt
Discrete wavelet transform (1D).
fht
Calculate the Fast Hartley Transform of real input D.
fwht
Compute the Walsh-Hadamard transform of X using the Fast Walsh-Hadamard Transform (FWHT) algorithm.
hilbert
Analytic extension of real valued signal.
idct
Compute the inverse discrete cosine transform of X.
idct2
Compute the inverse 2-D discrete cosine transform of matrix X.
idst
Computes the inverse type I discrete sine transform of Y.
ifht
Calculate the inverse Fast Hartley Transform of real input D.
ifwht
Compute the inverse Walsh-Hadamard transform of X using the Fast Walsh-Hadamard Transform (FWHT) algorithm.
rceps
Produce the cepstrum of the signal x, and if desired, the minimum phase reconstruction of the signal x.

Power Spectrum Analysis

ar_psd
Calculate the power spectrum of the autoregressive model
cohere
Usage: [Pxx,freq] = cohere(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
cpsd
Estimate cross power spectrum of data X and Y by the Welch (1967) periodogram/FFT method.
csd
Usage: [Pxx,freq] = csd(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
mscohere
Estimate (mean square) coherence of signals X and Y.
pburg
usage: [psd,f_out] = pburg(x,poles,freq,Fs,range,method,plot_type,criterion)
pwelch
USAGE: [spectra,freq] = pwelch(x,window,overlap,Nfft,Fs, range,plot_type,detrend,sloppy) Estimate power spectral density of data "x" by the Welch (1967) period
pyulear
usage: [psd,f_out] = pyulear(x,poles,freq,Fs,range,method,plot_type)
tfe
Usage: [Pxx,freq] = tfe(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
tfestimate
Estimate transfer function of system with input X and output Y.
xcorr
Estimates the cross-correlation.
xcorr2
Compute the 2D cross-correlation of matrices A and B.
xcov
Compute covariance at various lags [=correlation(x-mean(x),y-mean(y))].
__power
Plot the power spectrum of the given ARMA model.

Window Functions

barthannwin
Return the filter coefficients of a modified Bartlett-Hann window of length M.
blackmanharris
Return the filter coefficients of a Blackman-Harris window of length M.
blackmannuttall
Return the filter coefficients of a Blackman-Nuttall window of length M.
bohmanwin
Return the filter coefficients of a Bohman window of length M.
boxcar
Return the filter coefficients of a rectangular window of length M.
chebwin
Return the filter coefficients of a Dolph-Chebyshev window of length M.
flattopwin
Return the filter coefficients of a Flat Top window of length M.
gaussian
Return a Gaussian convolution window of length M.
gausswin
Return the filter coefficients of a Gaussian window of length M.
hann
Return the filter coefficients of a Hanning window of length M.
kaiser
Return the filter coefficients of a Kaiser window of length M.
nuttallwin
Return the filter coefficients of a Blackman-Harris window defined by Nuttall of length M.
parzenwin
Return the filter coefficients of a Parzen window of length M.
rectwin
Return the filter coefficients of a rectangular window of length M.
triang
Return the filter coefficients of a triangular window of length M.
tukeywin
Return the filter coefficients of a Tukey window (also known as the cosine-tapered window) of length M.
ultrwin
Return the coefficients of an Ultraspherical window of length M.
welchwin
Return the filter coefficients of a Welch window of length M.
window
Create an M-point window from the function F.

System Identification

arburg
Calculate coefficients of an autoregressive (AR) model of complex data X using the whitening lattice-filter method of Burg (1968).
aryule
Fit an AR (P)-model with Yule-Walker estimates.
invfreq
usage: [B,A] = invfreq(H,F,nB,nA) [B,A] = invfreq(H,F,nB,nA,W) [B,A] = invfreq(H,F,nB,nA,W,[],[],plane) [B,A] = invfreq(H,F,nB,nA,W,iter,tol,plane)
invfreqs
Usage: [B,A] = invfreqs(H,F,nB,nA) [B,A] = invfreqs(H,F,nB,nA,W) [B,A] = invfreqs(H,F,nB,nA,W,iter,tol,'trace')
invfreqz
usage: [B,A] = invfreqz(H,F,nB,nA) [B,A] = invfreqz(H,F,nB,nA,W) [B,A] = invfreqz(H,F,nB,nA,W,iter,tol,'trace')
levinson
Use the Durbin-Levinson algorithm to solve: toeplitz(acf(1:p)) * x = -acf(2:p+1).

Sample Rate Change

data2fun
Creates a vectorized function based on data samples using interpolation.
decimate
Downsample the signal X by a reduction factor of Q.
downsample
Downsample the signal, selecting every Nth element.
interp
Upsample the signal x by a factor of q, using an order 2*q*n+1 FIR filter.
resample
Change the sample rate of X by a factor of P/Q.
upfirdn
Upsample, FIR filtering, and downsample.
upsample
Upsample the signal, inserting N-1 zeros between every element.

Utility

buffer
Buffer a signal into a data frame.
clustersegment
Calculate boundary indexes of clusters of 1's.
findpeaks
Finds peaks on DATA.
fracshift
Shift the series X by a (possibly fractional) number of samples D.
marcumq
Compute the generalized Marcum Q function of order M with noncentrality parameter A and argument B.
primitive
Calculates the primitive of a function.
sampled2continuous
Calculate the x(t) reconstructed from samples x[n] sampled at a rate 1/T samples per unit time.
schtrig
Implements a multisignal Schmitt trigger with levels LVL.
upsamplefill
Upsamples a vector interleaving given values or copies of the vector elements.
wconv
1-D or 2-D convolution.
wkeep
Extract the elements of X of size L from the center, the right or the left.
wrev
Reverse the order of the element of the vector X.
zerocrossing
Estimates the points at which a given waveform y=y(x) crosses the x-axis using linear interpolation.

Package: signal