📄 tmp615.m
字号:
%MATLAB PROGRAM 6-15
%Compare the different window
clf
Nwin=21;
n=0:Nwin-1;
for i=1:4
switch i
case 1
w=boxcar(Nwin);
stext='Rectangular Window';
case 2
w=hanning(Nwin);
stext='Hanning Window';
case 3
w=hamming(Nwin);
stext='Hamming Window';
case 4
w=bartlett(Nwin);
stext='Bartlett Window';
end
posplot=['22'int2str(i)];
subplot(posplot);
stem(n,w);
hold on
plot(n,w,'r');
xlabel('n');
ylabel('w(n)');
title(stext);
hold off
grid
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -