why is matlab giving me undefined variable cheby1?
Afficher commentaires plus anciens
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 commentaire
william Litvin
le 2 Sep 2017
Réponses (1)
Walter Roberson
le 2 Sep 2017
0 votes
Your code calls the function chebyl not cheby1 . Lower-case L where you need digit 1
Catégories
En savoir plus sur Chebyshev dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!