| Filter Design Toolbox™ | ![]() |
d = fdesign.lowpass
d = fdesign.lowpass(spec)
d = fdesign.lowpass(spec,specvalue1,specvalue2,...)
d = fdesign.lowpass(specvalue1,specvalue2,specvalue3,specvalue4)
d = fdesign.lowpass(...,fs)
d = fdesign.lowpass(...,magunits)
d = fdesign.lowpass constructs a lowpass filter specification object d, applying default values for the properties fp, fst, ap, and ast.
Using the fdesign.lowpass specification object with a design method generates a dfilt object.
d = fdesign.lowpass(spec) constructs object d and sets its 'Specification' property to the string in spec. Entries in the spec string represent various filter response features, such as the filter order, that govern the filter design. Valid entries for spec are shown below. The strings are not case sensitive.
fp,fst,ap,ast (default spec)
n,f3db
n,f3db,ap
n,f3db,ap,ast
n,f3db,ast
n,f3db,fst
n,fc
n,fc,ap,ast
n,fp,ap
n,fp,ap,ast
n,fp,fst,ap
n,fp,f3db
n,fp,fst
n,fp,fst,ap
n,fp,fst,ast
n,fst,ap,ast
n,fst,ast
nb,na,fp,fst
The string entries are defined as follows:
ap — amount of ripple allowed in the pass band in decibels (the default units). Also called Apass.
ast — attenuation in the stop band in decibels (the default units). Also called Astop.
f3db — cutoff frequency for the point 3 dB point below the passband value. Specified in normalized frequency units.
fc — cutoff frequency for the point 3 dB point below the passband value. Specified in normalized frequency units.
fp — frequency at the start of the pass band. Specified in normalized frequency units. Also called Fpass.
fst — frequency at the end of the stop band. Specified in normalized frequency units. Also called Fstop.
n — filter order.
na and nb are the order of the denominator and numerator.
Graphically, the filter specifications look similar to those shown in the following figure.

Regions between specification values like fp and fst are transition regions where the filter response is not explicitly defined.
The filter design methods that apply to a lowpass filter specification object change depending on the Specification string. Here are all the valid strings for lowpass filter specification objects.
fp,fst,ap,ast
n,f3dB
n,f3dB,Ap
n,f3dB,Ap,Ast
n,f3dB,Ast
n,f3dB, Fst
n,fc
n,fc,Ap,Ast
n,fp,ap
n,fp,ap,ast
n,fp,f3db
n,fp,fst
n,fp,fst,ap
n,fp,fst,ast
n,fst,ap,ast
n,fst,ast
n,fp,ap,ast
nb,na,fp,fst
d = fdesign.lowpass(spec,specvalue1,specvalue2,...) constructs an object d and sets its specification values at construction time using specvalue1, specvalue2, and so on for all of the specification variables in spec.
d = fdesign.lowpass(specvalue1,specvalue2,specvalue3,specvalue4) constructs an object d with values for the default Specification property string fp,fst,ap,ast using the specifications you provide as input arguments specvalue1,specvalue2,specvalue3,specvalue4.
d = fdesign.lowpass(...,fs) adds the argument fs, specified in Hz to define the sampling frequency to use. In this case, all frequencies in the specifications are in Hz as well.
d = fdesign.lowpass(...,magunits) specifies the units for any magnitude specification you provide in the input arguments. magunits can be one of
linear — specify the magnitude in linear units
dB — specify the magnitude in dB (decibels)
squared — specify the magnitude in power units
When you omit the magunits argument, fdesign assumes that all magnitudes are in decibels. Note that fdesign stores all magnitude specifications in decibels (converting to decibels when necessary) regardless of how you specify the magnitudes.
These examples how to construct a lowpass filter specification object. First, create a default lowpass filter object without using input arguments.
d=fdesign.lowpass
d =
Response: 'Minimum-order lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4x1 cell}
NormalizedFrequency: true
Fpass: 0.4500
Fstop: 0.5500
Apass: 1
Astop: 60Now create an object by passing specifications for the passband and stopband edge frequencies and the passband and stopband attenuations — the resulting object uses the input values for fp, fst, ap, and ast.
hs = fdesign.lowpass(.4,.5,1,80);
hs
hs =
Response: 'Minimum-order lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4x1 cell}
NormalizedFrequency: true
Fpass: 0.4000
Fstop: 0.5000
Apass: 1
Astop: 80Create another filter object, passing the values for n and fc rather than accepting the default values. You can add include the sampling frequency fs as the final input argument.
d=fdesign.lowpass('n,fc',10, 9600,48000)
d =
Response: 'Lowpass with cutoff'
Specification: 'N,Fc'
Description: {2x1 cell}
NormalizedFrequency: false
Fs: 48000
FilterOrder: 10
Fcutoff: 9600Finally, pass values for the filter specifications that match the default Specification string entries — fp = 0.4, fst = 0.5, ast = 80 and ap = 1.0. Add the sampling frequency on the end.
hs = fdesign.lowpass(.4,.5,1,80)
hs =
Response: 'Minimum-order lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4x1 cell}
NormalizedFrequency: true
Fpass: 0.4000
Fstop: 0.5000
Apass: 1
Astop: 80Finally, the next examples add the sampling frequency specification in Hz, and then the magunits option.
hs = fdesign.lowpass('N,Fp,Ap', 10, 9600, .5, 48000);and
hsmag = fdesign.lowpass(.4, .5, .98, .02, 'squared');
Using the last example filter object, create a highpass filter.
hd = design(hsmag,'cheby1';
fdesign, fdesign.bandpass, fdesign.bandstop, fdesign.highpass
![]() | fdesign.isinclp | fdesign.notch | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |