FUNCTION REFERENCE
designfilt
Design a digital FIR or IIR filter object from a response type and specifications.
Design a digital FIR or IIR filter object from a response type and specifications.
Syntax
d = designfilt(response, 'FilterOrder', n, Name, Value, ...)Responses: lowpassfir, highpassfir, bandpassfir, bandstopfir (CutoffFrequency or CutoffFrequency1/2, Hamming window design like fir1); lowpassiir, highpassiir, bandpassiir, bandstopiir (HalfPowerFrequency or HalfPowerFrequency1/2 gives Butterworth; StopbandFrequency plus StopbandAttenuation gives Chebyshev II). Frequencies are in Hz with 'SampleRate', otherwise normalised to the Nyquist frequency. Band IIR orders count both edges, like MATLAB. The digitalFilter works with filter, filtfilt, freqz, grpdelay, phasez, impz, filtord and [b,a] = tf(d); IIR Coefficients is an SOS matrix with the gain in the first section.
Example
d = designfilt('lowpassfir','FilterOrder',20,'CutoffFrequency',150,'SampleRate',1000); y = filter(d, randn(1,100));Differences from MATLAB: FilterOrder is required; passband/stopband-ripple specification sets, other windows and design methods (equiripple, kaiserwin, cheby1, ellip), the filter designer dialog and fvtool are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.