フィルターのクリア

PROBLEM IN DESIGNING A LOW PASS FILTER

2 ビュー (過去 30 日間)
raj
raj 2012 年 3 月 31 日
I have to design a lowpass filter with passband of 0-1000Hz and sampling rate of 10kHz when i implement using fdatool it works but when I use this piece of code there is an error saying 'Value must be strictly positive'. Here is the code please correct me
d = fdesign.lowpass('Fp,Fst,Ap,Ast',0,1000,1,80,10000);
Hd1 = design(d,'equiripple');
t = 0:1e-4:1;
x = cos(2*pi*500*t)+0.5*cos(2*pi*1000*t);
out = filter(Hd1,x);

採用された回答

Wayne King
Wayne King 2012 年 3 月 31 日
Because Fp is the passband frequency and Fst is the stopband frequency.
You have set your passband frequency to 0.
You cannot have a realizable "brick wall" filter. You must have some transition band between your passband frequency, which for you is 1000 (not 0!), and the stopband frequency.
d = fdesign.lowpass('Fp,Fst,Ap,Ast',1000,1200,1,80,10000);
Hd1 = design(d,'equiripple');
t = 0:1e-4:1;
x = cos(2*pi*500*t)+0.5*cos(2*pi*1000*t);
out = filter(Hd1,x);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital and Analog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by