Signal Toolkit - Functions
The following functions are available:
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 | Generate a Gaussian modulated sinusoidal pulse sampled at times T. |
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 ... |
shanwavf | Compute the Complex Shannon wavelet. |
shiftdata | Shift data IN to permute the dimension DIM to the first column. |
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. |
udecode | Invert the operation of uencode. |
uencode | Quantize the entries of the array IN using 2^N quantization levels. |
unshiftdata | Reverse what is done by shiftdata. |
vco | Creates a signal that oscillates at a frequency determined by input X with a ... |
Signal Measurement
findpeaks | Finds peaks on DATA. |
peak2peak | Compute the difference between the maximum and minimum values in the vector X. |
peak2rms | Compute the ratio of the largest absolute value to the root-mean-square (RMS)... |
rms | Compute the root-mean-square (RMS) of the vector X. |
rssq | Compute the root-sum-of-squares (RSS) of the vector X. |
Correlation and Convolution
cconv | Compute the modulo-N circular convolution. |
convmtx | If A is a column vector and X is a column vector of length N, then |
wconv | 1-D or 2-D convolution. |
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))]. |
Filtering
filtfilt | Forward and reverse filter the signal. |
filtic | Set initial condition vector for filter function The vector zf has the same v... |
medfilt1 | Apply a one dimensional median filter with a window size of N to the data 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 ord... |
sosfilt | Second order section IIR filtering of X. |
Filter Analysis
filternorm | Compute the 2-norm of a digital filter defined by the numerator coefficients,... |
filtord | Returns the filter order N for a filter defined by the numerator coefficients... |
freqs | Compute the s-plane frequency response of the IIR filter B(s)/A(s) as H = pol... |
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 ma... |
grpdelay | Compute the group delay of a filter. |
impz | Generate impulse-response characteristics of the filter. |
isallpass | Determine whether a digital filter is allpass. |
ismaxphase | Determine whether a digital filter is maximum phase (maximum energy-delay). |
isminphase | Determine whether a digital filter is minimum phase. |
isstable | Returns a logical output equal to TRUE, if the filter is stable. |
phasez | Compute the phase response of digital filter defined either by its coefficien... |
zplane | Plot the poles and zeros on a complex plane. |
Filter Conversion
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). |
sos2ss | Convert series second-order sections to state-space. |
sos2tf | Convert series second-order sections to transfer function. |
sos2zp | Convert series second-order sections to zeros, poles, and gains (pole residue... |
ss2tf | Conversion from state-space to transfer function representation. |
ss2zp | Converts a state space representation to a set of poles and zeros; K is a gai... |
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 res... |
cheb | Returns the value of the nth-order Chebyshev polynomial calculated at the poi... |
cheb1ap | Design lowpass analog Chebyshev type I filter. |
cheb1ord | Compute the minimum filter order of a Chebyshev type I filter with the desire... |
cheb2ap | Design lowpass analog Chebyshev type II filter. |
cheb2ord | Compute the minimum filter order of a Chebyshev type II filter with the desir... |
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 ... |
ellipap | Design lowpass analog elliptic filter. |
ellipord | Compute the minimum filter order of an elliptic filter with the desired respo... |
iirlp2mb | IIR Low Pass Filter to Multiband Filter Transformation |
impinvar | Converts analog filter with coefficients B and A to digital, conserving impul... |
invimpinvar | Converts digital filter with coefficients B and A to analog, conserving impul... |
firpm | Designs a linear-phase FIR filter according to given specifications and the '... |
firpmord | Estimate the filter-order needed for ‘firpm’ to design a type-I or type-I... |
ncauer | Analog prototype for Cauer filter. |
pei_tseng_notch | Return coefficients for an IIR notch-filter with one or more filter frequenci... |
sftrans | Transform band edges of a generic lowpass filter (cutoff at W=1) represented ... |
FIR Filter Design
cl2bp | Constrained L2 bandpass FIR filter design. |
fir1 | Produce an order N FIR filter with the given frequency cutoff W, returning th... |
fir2 | Produce an order N FIR filter with arbitrary frequency response M over freque... |
firls | FIR filter design using least squares method. |
kaiserord | Return the parameters needed to produce a filter of the desired specification... |
qp_kaiser | Computes a finite impulse response (FIR) filter for use with a quasi-perfect ... |
remez | Parks-McClellan optimal FIR filter design. |
sgolay | Computes the filter coefficients for all Savitzsky-Golay smoothing filters of... |
Transforms
bitrevorder | Reorder the elements of the vector X in bit-reversed order. |
cceps | Return the complex cepstrum of the vector X. |
cplxreal | Sort the numbers Z into complex-conjugate-valued and real-valued elements. |
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 Trans... |
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-Hadama... |
rceps | Return the cepstrum of the signal X. |
Power Spectrum Analysis
ar_psd | Calculate the power spectrum of the autoregressive model |
cohere | Estimate (mean square) coherence of signals x and y. |
cpsd | Estimate cross power spectrum of data X and Y by the Welch (1967) periodogram... |
csd | Estimate cross power spectrum of data x and y by the Welch (1967) periodo... |
db2pow | Convert decibels (dB) to power. |
mscohere | Estimate (mean square) coherence of signals X and Y. |
pburg | Calculate Burg maximum-entropy power spectral density. |
pow2db | Convert power to decibels (dB). |
pwelch | Estimate power spectral density of data x by the Welch (1967) periodogram/F... |
pyulear | Calculates a Yule-Walker autoregressive (all-pole) model of the data x and ... |
tfe | Estimate transfer function of system with input x and output y. |
tfestimate | Estimate transfer function of system with input X and output 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. |
expwin | Return the coefficients of an exponential window(1) 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... |
parzenwin | Return the filter coefficients of a Parzen window of length M. |
poisswin | Return the coefficients of a Poisson (a.k.a. exponential) window(1) of lengt... |
rectwin | Return the filter coefficients of a rectangular window of length M. |
taylorwin | Return the coefficients of a Taylor window of length M, whose Fourier transfo... |
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-ta... |
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 usin... |
aryule | Fit an AR (P)-model with Yule-Walker estimates. |
invfreq | Fit filter B(z)/A(z) or B(s)/A(s) to complex frequency response at frequency ... |
invfreqs | Fit filter B(s)/A(s)to the complex frequency response H at frequency points F. |
invfreqz | Fit filter B(z)/A(z)to the complex frequency response H at frequency points F. |
levinson | Use the Durbin-Levinson algorithm to solve: toeplitz(acf(1:p)) * x = -acf(2:p... |
lpc | Determines the forward linear predictor by minimizing the prediction error in... |
Sample Rate Change
data2fun | Create 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. |
Pulse Metrics
statelevels | Estimate state-level for bilevel waveform A using histogram method |
Utility
buffer | Buffer a signal into a data frame. |
clustersegment | Calculate boundary indexes of clusters of 1's. |
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 param... |
primitive | Calculate the primitive of a function. |
sampled2continuous | Calculate the x(t) reconstructed from samples x[n] sampled at a rate 1/T samp... |
schtrig | Implements a multisignal Schmitt trigger with levels LVL. |
upsamplefill | Upsamples a vector interleaving given values or copies of the vector elements. |
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 usin... |