Specifications for filter specification object
setspecs(...Fs) specifies the sampling frequency, Fs, in Hz. The sampling frequency must be a scalar trailing all other specifications. Entering a sampling frequency causes all other frequency specifications to be in Hz.
setspecs(...,MAGUNITS) specifies the units for any magnitude specifications. MAGUNITS can be one of the following: 'linear', 'dB', or 'squared'. The default is 'dB'. The magnitude specifications are always converted and stored in dB regardless of how the units are specified.
Use SET(D,'SPECIFICATION') to get the list of all available specification types for the filter specification object, D.
Construct a lowpass filter with specifications for the filter order and cutoff frequency (-6 dB). Use setspecs after construction to set the values of the filter order and cutoff frequency. Display the values in the MATLAB® command window.
D = fdesign.lowpass('N,Fc'); setspecs(D,10,0.2); D.FilterOrder D.Fcutoff
Construct a highpass filter with specifications for the numerator order, denominator order, and 3-dB frequency. Assume the sampling frequency is 1 kHz. Use setspecs to set the numerator and denominator orders to 6. Set the 3-dB frequency to 250 Hz. In order to use frequency specifications in Hz, specify the sampling frequency as a trailing scalar.
D = fdesign.highpass('Nb,Na,F3dB'); setspecs(D,6,6,250,1000);