필터 지우기
필터 지우기

How use filter from filter designer

조회 수: 22 (최근 30일)
RichardB
RichardB 2020년 8월 13일
편집: Vincent St-Pierre 2022년 11월 21일
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);

채택된 답변

Antonio Ciociola
Antonio Ciociola 2020년 8월 14일
y = filter(Hd,x);
x is the signal that you want to filter.
  댓글 수: 1
Vincent St-Pierre
Vincent St-Pierre 2022년 11월 21일
편집: Vincent St-Pierre 2022년 11월 21일
I tried this but get an error :
>> sdemod2 = filter(Hd,sdemod);
Error using filter
Not enough input arguments.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by