?? test chebwin.m and kaiser.m.m
字號:
%----------------------------------------------------------------------------
% exa070900.m, for fig. 7.9.1,
% to test chebwin.m and kaiser.m,
%----------------------------------------------------------------------------
clear all;
% 求切比雪夫窗函數和頻譜;
N=31;
A=40;
w=chebwin(N,A);
[W,f]=freqz(w,1,256,'whole',1);
subplot(321)
t=0:N-1;
stem(t,w,'.k')
ylabel(' chebyshev')
W=20*log10(abs(W)/abs(W(1)));
subplot(322)
f=f-0.5;
plot(f,fftshift(W));grid on;
% 求凱塞窗函數和頻譜;
beta=5;
w=kaiser(N,beta);
[W,f]=freqz(w,1,256,'whole',1);
subplot(323)
stem(t,w,'.k')
ylabel( 'kaiser')
W=20*log10(abs(W)/abs(W(1)));
subplot(324)
f=f-0.5;
plot(f,fftshift(W));grid on;
% 求凱塞窗函數和頻譜;
beta=10;
w=kaiser(N,beta);
[W,f]=freqz(w,1,256,'whole',1);
subplot(325)
stem(t,w,'.k')
ylabel( 'kaiser')
W=20*log10(abs(W)/abs(W(1)));
subplot(326)
f=f-0.5;
plot(f,fftshift(W));grid on;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -