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

📄 ex071300.m

📁 DSP2 using matlab v4
💻 M
字号:
% Chapter 07: Example 7.13 Hilbert Transformer design - Hanning window%M = 25; alpha = (M-1)/2;n = 0:M-1;hd = (2/pi)*((sin((pi/2)*(n-alpha)).^2)./(n-alpha)); hd(alpha+1)=0;w_han = (hanning(M))';h = hd .* w_han;[Hr,w,P,L] = Hr_Type3(h);% plotssubplot(1,1,1);subplot(2,2,1); stem(n,hd); title('Ideal Impulse Response')axis([-1 M -1.2 1.2]); xlabel('n'); ylabel('hd(n)')subplot(2,2,2); stem(n,w_han);title('Hanning Window')axis([-1 M 0 1.2]); xlabel('n'); ylabel('w(n)')subplot(2,2,3); stem(n,h);title('Actual Impulse Response')axis([-1 M -1.2 1.2]); xlabel('n'); ylabel('h(n)')w = w'; Hr = Hr';w = [-fliplr(w), w(2:501)]; Hr = [-fliplr(Hr), Hr(2:501)];subplot(2,2,4);plot(w/pi,Hr); title('Amplitude Response');grid;xlabel('frequency in pi units'); ylabel('Hr')axis([-1 1 -1.1 1.1]); set(gca,'XTickMode','manual','XTick',[-1,0,1])set(gca,'YTickMode','manual','YTick',[-1,0,1])

⌨️ 快捷键说明

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