why is matlab giving me undefined variable cheby1?
古いコメントを表示
clear all;
w1 = 2*pi*2000;
w2 = 2*pi*4000;
wn = [w1 w2];
Rp = 3;
[b,a]= chebyl(6,Rp,wn,'s');
[z,p,k] = cheby1(6,Rp,wn,'s');
subplot(2,1,1);
zplane(z,p);
H = zpk(z,p,k);
[h,w] = freqs(b,a,2000);
subplot(2,1,2);
n=20*log10(abs(h));
plot(w/(2*pi),n);
xlabel('Hz');
ylabel('Gain in db');
xlim([0 8000]);
title(' Chebyshev Type 1 Band Pass Filter');
COMMAND WINDOW ERROR
Undefined function or variable 'chebyl'.
Error in chebychev_band_test (line 11)
[b,a]= chebyl(6,Rp,wn,'s');
回答 (1 件)
Walter Roberson
2017 年 9 月 2 日
0 投票
Your code calls the function chebyl not cheby1 . Lower-case L where you need digit 1
カテゴリ
ヘルプ センター および File Exchange で Chebyshev についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!