How use filter from filter designer
26 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
RichardB
el 13 de Ag. de 2020
Editada: Vincent St-Pierre
el 21 de Nov. de 2022
Dumb question here.
I created a bandpass filter in Filter Designer by generating the matlab code and stored the filter.
Now, how do I actually use it to process my signal. Below is the code generated.
Thanks
% All frequency values are in Hz.
Fs = 5000; % Sampling Frequency
Fstop1 = 2; % First Stopband Frequency
Fpass1 = 5; % First Passband Frequency
Fpass2 = 1000; % Second Passband Frequency
Fstop2 = 1200; % Second Stopband Frequency
Astop1 = 30; % First Stopband Attenuation (dB)
Apass = 1; % Passband Ripple (dB)
Astop2 = 30; % Second Stopband Attenuation (dB)
match = 'passband'; % Band to match exactly
% Construct an FDESIGN object and call its BUTTER method.
h = fdesign.bandpass(Fstop1, Fpass1, Fpass2, Fstop2, Astop1, Apass, ...
Astop2, Fs);
Hd = design(h, 'butter', 'MatchExactly', match);
0 comentarios
Respuesta aceptada
Antonio Ciociola
el 14 de Ag. de 2020
y = filter(Hd,x);
x is the signal that you want to filter.
1 comentario
Vincent St-Pierre
el 21 de Nov. de 2022
Editada: Vincent St-Pierre
el 21 de Nov. de 2022
I tried this but get an error :
>> sdemod2 = filter(Hd,sdemod);
Error using filter
Not enough input arguments.
Más respuestas (0)
Ver también
Categorías
Más información sobre Filter Design en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!