代码:

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

  运行结果:

ω=π时,振幅谱为零。有3个零点对,其中一个在ω=π的位置。

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

  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. Moment.js的一些用法

    前记:项目开发用到了日历插件(Pikaday.js),同时也用到了Moment.js(日期处理类库) 1.subtract:减去,下面代码的意思是减去1天 this.yestdayStr = mome ...

  2. Android和iOS中Cocos2dx的横屏竖屏设置

    一.横屏.竖屏设置 1.android AndroidManifest.xml文件中, screenOrientation="landscape" 为横屏, screenOrien ...

  3. Git 的origin和master分析(转)

    转:http://lishicongli.blog.163.com/blog/static/1468259020132125247302/ 首先要明确一点,对git的操作是围绕3个大的步骤来展开的(其 ...

  4. 032——VUE中表单控件处理之复选框的处理

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. SQL SERVER 导入、导出数据到Exce(使用OpenRowset,、OpenDataSource函数)以及访问远程数据库(openrowset/opendatasource/openquery)

    启用Ad Hoc Distributed Queries 在使用openrowset/opendatasource前搜先要启用Ad Hoc Distributed Queries服务,因为这个服务不安 ...

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

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

  7. 【实用工具】google访问不了比较好的解决办法

    一.直接添加ip,74.125.128.(31~167)都可以,不过不稳定 二.不使用.hk的后缀名,使用.tw,co.jp等均可(同IE用户) 三.下载这个脚本,进行安装(右上角点击“install ...

  8. redis的list类型以及其操作

    lists类型 给你个图;' lists类型以及操作List是一个链表结构,主要功能是push.pop.获取一个范围的所有值等等,操作中key理解为链表的名字.Redis的list类型其实就是每一个子 ...

  9. Talk to customer about the trouble with wireless failure connection。

    It’s upset for  me... 1 ATemel Studio61 and  MKII program failure. Notes: The Flash file : A 90 is w ...

  10. 如何修改MyEclipse的默认编码方式

    在创建jsp页面时,默认首行出现“<%@ page language="java" import="java.util.*" pageEncoding=& ...