📄 t1.m
字号:
Wp=0.1;Ws=0.4;Rp=1;Rs=15;
[N,Wpo]=cheb1ord(Wp,Ws,Rp,Rs);
[Bz,Az]=cheby1(N,Rp,Wpo);
w=0:0.1:pi;
[H,w1]=freqz(Bz,Az,w);H=20*log(abs(H));
figure(1)
plot(w/pi,H),grid on
f1=50;f2=500;
fs=1000;T=1/fs;Tp=N*T;%采样频率fa=1kHZ,Tp为采样时间
t=0:T:(N-1)*T;
x=sin(2*pi*f1*t)+cos(2*pi*f2*t);
y=filter(Bz,Az,x);
figure(2)
plot(t,y),grid on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -