MATLAB: Error with using filter

filtering

Hi all,
I have to filter few signals and I wrote the following code:
Fpass = 40; % Passband Frequency
Fstop = 45; % Stopband Frequency
Apass = 1; % Passband Ripple (dB)
Astop = 80; % Stopband Attenuation (dB)
Fs = 100; % Sampling Frequency
h = fdesign.lowpass('Fp,Fst,Ap,Ast', Fpass, Fstop, Apass, Astop, Fs);
Hd = design(h, 'butter','MatchExactly', 'stopband','SystemObject', true);
a=rand(1000,1);
a=filter(Hd,a);
I get the following error:
Undefined function 'filter' for input arguments of type 'dsp.BiquadFilter'.
Why do I get that error?
Thanks
Regards
Pietro

Best Answer

dsp.BiquadFilter is a System object, so its main method is step(). Try
a = step(Hd,a)