代码:

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

  运行结果:

从右上角图中看出,ω=0、π的时候,振幅为零。两个零点对。

《DSP using MATLAB》示例Example7.6 Type-3 Linear-Phase FIR的更多相关文章

  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. 【三小时学会Kubernetes!(一) 】容器简介及为每个服务创建镜像

    容器是什么 Kubernetes 是容器管理平台.可想而知我们需要容器去管理它们.但是容器是什么?Docker 官方文档的最佳答案如下: 容器映像是轻量级的.独立的.可执行软件包,包含所有可运行的东西 ...

  2. JavaScript encodeURIComponent()

    ■ 把字符串作为 URI 组件进行编码.JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:unes ...

  3. bzoj 1996 区间dp

    1996: [Hnoi2010]chorus 合唱队 Time Limit: 4 Sec  Memory Limit: 64 MBSubmit: 1727  Solved: 1115[Submit][ ...

  4. Hadoop出现 Wrong FS: hdfs://......错误的解决方法

    今天在hadoop项目中出现以下报错:java.lang.IllegalArgumentException: Wrong FS: hdfs://......,expected: file:///... ...

  5. (转)让IE6/IE7/IE8浏览器支持CSS3属性

    原文链接 http://blog.csdn.net/h5_queenstyle12/article/details/50437442 一.下载 搜索下载:ie-css3.htc,它是让IE浏览器支持C ...

  6. nodejs利用express操作mysql增删改查

    如果不知道怎么连接数据库的请看http://www.cnblogs.com/complete94/p/6714757.html 我当大家都知道怎么连接数据库了,那么 我们开始吧 var express ...

  7. Java进阶7并发优化4——JDK并发数据结构

    Java进阶7并发优化4——JDK并发数据结构20131114 由于并发程序和串行程序的不同特点,在串行程序中使用的数据结构可能无法在并行程序中直接的正常使用,因为这些数据结构可能不是线程安全的,所以 ...

  8. 缓存LruCache简单创建和使用

    LruCache一般使用: /** * 总容量为当前进程的1/8,单位:KB * sizeOf():计算缓存对象的大小,单位要一致 * entryRemoved():移除旧缓存时调用 */ int m ...

  9. 【Seajs源码分析】2. 工具方法1

    Sea.js: var seajs = global.seajs = { // The current version of Sea.js being used version: "@VER ...

  10. New Concept English there (7)

    27w/m Has it ever happened to you? Have you ever put your trousers in the washing machine and then r ...