Type-4 Linear-Phase FIR filter

代码:

h = [-4, 1, -1, -2, 5, 6, -6, -5, 2, 1, -1, 4];
M = length(h); n = 0:M-1;
[Hr, w, d, L] = Hr_Type4(h);
d
L dmax = max(d) + 1; dmin = min(d) - 1; figure('NumberTitle', 'off', 'Name', 'Exameple 7.7')
set(gcf,'Color','white'); subplot(2,2,1); stem(n, h); axis([-1, 2*L+1, dmin, dmax]); grid on;
xlabel('n'); ylabel('h(n)'); title('Impulse Response'); subplot(2,2,3); stem(1:L, d); axis([-1, 2*L+1, dmin, dmax]); grid on;
xlabel('n'); ylabel('d(n)'); title('d(n) coefficients'); subplot(2,2,2); plot(w/pi, Hr); grid on;
xlabel('frequency in \pi units'); ylabel('Hr'); title('Type-4 Amplitude Response'); subplot(2,2,4); zplane(h); grid on;
xlabel('real axis'); ylabel('imaginary axis'); title('Pole-Zero Plot');

  运行结果:

3个零点对,一个零点位于ω=0处。

《DSP using MATLAB》示例Example7.7的更多相关文章

  1. DSP using MATLAB 示例Example3.21

    代码: % Discrete-time Signal x1(n) % Ts = 0.0002; n = -25:1:25; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*a ...

  2. DSP using MATLAB 示例 Example3.19

    代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Discrete-time Signa ...

  3. DSP using MATLAB示例Example3.18

    代码: % Analog Signal Dt = 0.00005; t = -0.005:Dt:0.005; xa = exp(-1000*abs(t)); % Continuous-time Fou ...

  4. DSP using MATLAB 示例Example3.23

    代码: % Discrete-time Signal x1(n) : Ts = 0.0002 Ts = 0.0002; n = -25:1:25; nTs = n*Ts; x1 = exp(-1000 ...

  5. DSP using MATLAB 示例Example3.22

    代码: % Discrete-time Signal x2(n) Ts = 0.001; n = -5:1:5; nTs = n*Ts; Fs = 1/Ts; x = exp(-1000*abs(nT ...

  6. DSP using MATLAB 示例Example3.17

  7. DSP using MATLAB示例Example3.16

    代码: b = [0.0181, 0.0543, 0.0543, 0.0181]; % filter coefficient array b a = [1.0000, -1.7600, 1.1829, ...

  8. DSP using MATLAB 示例 Example3.15

    上代码: subplot(1,1,1); b = 1; a = [1, -0.8]; n = [0:100]; x = cos(0.05*pi*n); y = filter(b,a,x); figur ...

  9. DSP using MATLAB 示例 Example3.13

    上代码: w = [0:1:500]*pi/500; % freqency between 0 and +pi, [0,pi] axis divided into 501 points. H = ex ...

  10. DSP using MATLAB 示例 Example3.12

    用到的性质 代码: n = -5:10; x = sin(pi*n/2); k = -100:100; w = (pi/100)*k; % freqency between -pi and +pi , ...

随机推荐

  1. IE 中的 button type默认值问题

    今天遇到一个问题. 将项目页面的渲染模式从 IE7 改为 IE10 后(<meta http-equiv="X-UA-Compatible" content="IE ...

  2. Python模块学习之解决selenium的“can't access dead object”错误

    问题描述 在python执行过程中,提示selenium.common.exceptions.WebDriverException: Message: TypeError: can't access ...

  3. MS SQL2008执行大脚本文件时,提示“内存不足”的解决办法

    问题描述: 当客户服务器不允许直接备份时,往往通过导出数据库脚本的方式来部署-还原数据库, 但是当数据库导出脚本很大,用Microsoft SQL Server Management Studio执行 ...

  4. shiro:10个过滤器;10个jsp标签;5个@注解

    10个过滤器 过滤器简称 对应的java类 anon org.apache.shiro.web.filter.authc.AnonymousFilter authc org.apache.shiro. ...

  5. 前端开发必备 - Emmet

    介绍 Emmet (前身为 Zen Coding) 是一个能大幅度提高前端开发效率的一个工具. 基本上,大多数的文本编辑器都会允许你存储和重用一些代码块,我们称之为"片段".虽然片 ...

  6. zoj 2966 Build The Electric System(最小生成树)

    Build The Electric System Time Limit: 2 Seconds      Memory Limit: 65536 KB In last winter, there wa ...

  7. operator[],识别读操作和写操作

    body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...

  8. 本地如何搭建IPv6环境测试你的APP(转)

    IPv6的简介 IPv4 和 IPv6的区别就是 IP 地址前者是 .(dot)分割,后者是以 :(冒号)分割的(更多详细信息自行搜索). PS:在使用 IPv6 的热点时候,记得手机开 飞行模式 哦 ...

  9. recovery.conf文件详解

    在恢复过程中,用户可以通过使用recovery.conf文件来指定恢复的各个参数,如下: 归档恢复设置 restore_command:用于获取一个已归档段的XLOG日志文件的命令 archive_c ...

  10. 转一个有意思的利用存储过程备份恢复PostgreSQL

    [转自 housonglin1213 的博客]http://blog.csdn.net/housonglin1213/article/details/51005540 1.自定义函数脚本备份 CREA ...