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

📄 40t.m

📁 包含50个数字信号处理方面的matlab程序
💻 M
字号:
wc=0.25*pi;N=21;
n=[0:1:N-1];
hd=ideal_lp(wc,N);
w_han=(boxcar(N))';%矩形窗
h=hd.*w_han; 
[db,mag,pha,grd,w]=freqz_m(h,1);
subplot(2,1,1);stem(n,h,'.');title('h(n)');grid;hold on;
subplot(212);plot(w/pi,db,'y');xlabel('w/pi');ylabel('dB');hold on;
w_han=(hamming(N))';%海明窗
h=hd.*w_han; 
[db,mag,pha,grd,w]=freqz_m(h,1);
subplot(2,1,1);stem(n,h,'*');title('h(n)');grid;hold on;
subplot(212);plot(w/pi,db,'b');xlabel('w/pi');ylabel('dB');hold on;
w_han=(hanning(N))';%汉宁窗
h=hd.*w_han;
[db,mag,pha,grd,w]=freqz_m(h,1);
subplot(2,1,1);stem(n,h,'.');title('h(n)');grid;hold on;
subplot(212);plot(w/pi,db,'r');xlabel('w/pi');ylabel('dB');hold on;
w_han=(blackman(N))';%布莱克曼窗
h=hd.*w_han;
[db,mag,pha,grd,w]=freqz_m(h,1);
subplot(2,1,1);stem(n,h,'.');title('h(n)');grid;hold on;
subplot(212);plot(w/pi,db,'g');xlabel('w/pi');ylabel('dB');hold on;

⌨️ 快捷键说明

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