Navigation

Operators and Keywords

Function List:

C++ API

signal

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

Select category:

Signals

diric
Compute the dirichlet function.
gauspuls
Return the Gaussian modulated sinusoidal pulse.
gmonopuls
Return the gaussian monopulse.
pulstran
usage: y=pulstran(t,d,'func',.
tripuls
usage: y = tripuls(t, w, skew)
rectpuls
usage: y = rectpuls(t, w)
sawtooth
Generates a sawtooth wave of period `2 * pi' with limits `+1/-1' for the elements of T.
square
Generate a square wave of period 2 pi with limits +1/-1.
chirp
usage: y = chirp(t [, f0 [, t1 [, f1 [, form [, phase]]]]])
specgram
usage: [S [, f [, t]]] = specgram(x [, n [, Fs [, window [, overlap]]]])
buffer
Buffer a signal into a data frame.
mexihat
Compute the Mexican hat wavelet.
meyeraux
Compute the Meyer wavelet auxiliary function.
morlet
Compute the Morlet wavelet.
shanwavf
Compute the Complex Shannon wavelet.
cmorwavf
Compute the Complex Morlet wavelet.
sigmoid_train
Evaluates a train of sigmoid functions at T.

Filtering

filtfilt
usage: y = filtfilt(b, a, x)
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
sgolayfilt
y = sgolayfilt (x, p, n [, m [, ts]]) 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.
medfilt1
y = medfilt1(x [, n])
movingrms
Calculates moving RMS value of the signal in X.

Filter analysis

freqs
Usage: H = freqs(B,A,W);
freqs_plot
Plot the amplitude and phase of the vector H.
grpdelay
Compute the group delay of a filter.
impz
usage: [x, t] = impz(b [, a, n, fs])
zplane
usage: zplane(b [, a]) or zplane(z [, p])
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).

Filter conversion

convmtx
If A is a column vector and X is a column vector of length N, then
residuez
Compute the partial fraction expansion of filter H(z) = B(z)/A(z).
residued
Compute the partial fraction expansion (PFE) 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
Converts 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.
polystab
b = polystab(a)

IIR Filter design

besself
Generate a bessel filter.
buttap
Design lowpass analog Butterworth filter.
butter
Generate a butterworth filter.
cheb
Usage: cheb (n, x)
cheb1ap
Design lowpass analog Chebyshev type I filter.
cheb2ap
Design lowpass analog Chebyshev type II filter.
cheby1
Generate an Chebyshev type I filter with Rp dB of pass band ripple.
cheby2
Generate an Chebyshev type II filter with Rs dB of stop band attenuation.
ellipap
Design lowpass analog elliptic filter.
ellip
N-ellip 0.
ncauer
usage: [Zz, Zp, Zg] = ncauer(Rp, Rs, n)
buttord
Compute butterworth filter order and cutoff for the desired response characteristics.
cheb1ord
Compute chebyshev type I filter order and cutoff for the desired response characteristics.
cheb2ord
Compute chebyshev type II filter order and cutoff for the desired response characteristics.
ellipord
usage: [n,wp] = ellipord(wp,ws, rp,rs)
besselap
Return bessel analog filter prototype.
sftrans
usage: [Sz, Sp, Sg] = sftrans(Sz, Sp, Sg, W, stop)
bilinear
usage: [Zz, Zp, Zg] = bilinear(Sz, Sp, Sg, T) [Zb, Za] = bilinear(Sb, Sa, T)
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.
iirlp2mb
IIR Low Pass Filter to Multiband Filter Transformation
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'.

FIR filter design

fir1
usage: b = fir1(n, w [, type] [, window] [, noscale])
fir2
usage: b = fir2(n, f, m [, grid_n [, ramp_n]] [, window])
firls
b = firls(N, F, A); b = firls(N, F, A, W);
kaiserord
usage: [n, Wn, beta, ftype] = kaiserord(f, m, dev [, fs])
remez
b = remez(n, f, a [, w] [, ftype] [, griddensity]) Parks-McClellan optimal FIR filter design.
sgolay
F = sgolay (p, n [, m [, ts]]) Computes the filter coefficients for all Savitzsky-Golay smoothing filters of order p for length n (odd).
qp_kaiser
Usage: qp_kaiser (nb, at, linear)
cl2bp
Constrained L2 bandpass FIR filter design.

Transforms

czt
usage y=czt(x, m, w, a)
dctmtx
T = dctmtx (n) Return the DCT transformation matrix of size n x n.
dct2
y = dct2 (x) Computes the 2-D discrete cosine transform of matrix x
idct2
y = idct2 (x) Computes the inverse 2-D discrete cosine transform of matrix x
dct
y = dct (x, n) Computes the discrete cosine transform of x.
idct
y = dct (x, n) Computes the inverse discrete cosine transform of x.
dst
Computes the type I discrete sine transform of X.
idst
Computes the inverse type I discrete sine transform of Y.
dftmtx
If N is a scalar, produces a N-by-N matrix D such that the Fourier transform of a column vector of length N is given by `dftmtx(N) * x' and the inverse Fourier transform is given by `inv(dftmtx(N)) *
hilbert
Analytic extension of real valued signal
rceps
usage: [y, xm] = rceps(x) Produce the cepstrum of the signal x, and if desired, the minimum phase reconstruction of the signal x.
cceps
usage: cceps (x [, correct])
cplxreal
Split the vector z into its complex (ZC) and real (ZR) elements, eliminating one of each complex-conjugate pair.
bitrevorder
Reorder x in the bit reversed order
dwt
Comupte de discrete wavelet transform of x with one level.
fht
The function fht calculates Fast Hartley Transform where D is the real input vector (matrix), and M is the real-transform vector.
ifht
The function ifht calculates Fast Hartley Transform where D is the real input vector (matrix), and M is the real-transform vector.
fwht
Compute the Walsh-Hadamard transform of X using the Fast Walsh-Hadamard Transform (FWHT) algorithm.
ifwht
Compute the inverse Walsh-Hadamard transform of X using the Fast Walsh-Hadamard Transform (FWHT) algorithm.

Power spectrum analysis

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
tfe
Usage: [Pxx,freq] = tfe(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
tfestimate
Usage: [Pxx,freq]=tfestimate(x,y,window,overlap,Nfft,Fs,range)
cohere
Usage: [Pxx,freq] = cohere(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
csd
Usage: [Pxx,freq] = csd(x,y,Nfft,Fs,window,overlap,range,plot_type,detrend)
ar_psd
Usage: [psd,f_out] = ar_psd(a,v,freq,Fs,range,method,plot_type)
cpsd
Usage: [Pxx,freq] = cpsd(x,y,window,overlap,Nfft,Fs,range)
mscohere
Usage: [Pxx,freq]=mscohere(x,y,window,overlap,Nfft,Fs,range)
pburg
usage: [psd,f_out] = pburg(x,poles,freq,Fs,range,method,plot_type,criterion)
pyulear
usage: [psd,f_out] = pyulear(x,poles,freq,Fs,range,method,plot_type)
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
usage: [P, w] = __power (b, a, [, nfft [, Fs]] [, range] [, units]) Plot the power spectrum of the given ARMA model.

Window functions

window
Create a N-point windowing from the function F.
barthannwin
Compute the modified Bartlett-Hann window of lenght L.
blackmanharris
Compute the Blackman-Harris window.
blackmannuttall
Compute the Blackman-Nuttall window.
bohmanwin
Compute the Bohman window of lenght L.
boxcar
usage: w = boxcar (n)
chebwin
Usage: chebwin (L, at)
flattopwin
flattopwin(L, [periodic|symmetric])
hann
w = hann(n) see hanning
kaiser
usage: kaiser (L, beta)
nuttallwin
Compute the Blackman-Harris window defined by Nuttall of length L.
triang
usage: w = triang (L)
gaussian
usage: w = gaussian(n, a)
gausswin
usage: w = gausswin(L, a)
tukeywin
Return the filter coefficients of a Tukey window (also known as the cosine-tapered window) of length L.
rectwin
Return the filter coefficients of a rectangle window of length L.
welchwin
Returns a row vector containing a Welch window, given by W(n)=1-(n/N-1)^2, n=[0,1, .
parzenwin
Compute the Parzen window of lenght L.

System identification

arburg
[a,v,k] = arburg(x,poles,criterion)
aryule
usage: [a, v, k] = aryule (x, p) fits 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
usage: [a, v, ref] = levinson (acf [, p])

Sample rate change

decimate
usage: y = decimate(x, q [, n] [, ftype])
interp
usage: y = interp(x, q [, n [, Wc]])
downsample
Downsample the signal, selecting every nth element.
upsample
Upsample the signal, inserting n-1 zeros between every element.
resample
Change the sample rate of X by a factor of P/Q.
upfirdn
Upsample, FIR filtering and downsample.
data2fun
Creates a vectorized function based on data samples using interpolation.

Utility

buffer
Buffer a signal into a data frame.
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.
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.
sampled2continuous
Usage: xt = sampled2continuous( xn , T, t ) 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.
clustersegment
Calculate boundary indexes of clusters of 1's.

Package: signal