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!