⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmp616.m

📁 信号分析与处理的一些源代码
💻 M
字号:
%MATLAB PROGRAM 6-16
%Compare the different window
clf
Nfft=512;
Nwin=20;
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   
   
[y,f]=freqz(w,1,Nfft);
mag=abs(y);
posplot=['22'int2str(i)];
subplot(posplot)
plot(f/pi,20*log10(mag/max(mag)));
xlabel('Normalized Frequency');
ylabel(' Magnitude dB');
title(stext);
%axis([0 500 0 1]);
grid
end  	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -