代码:

%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 6.5 \n\n'); banner();
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ b = [1 -2.828 3.97 -2.828 1]; a = [1 -2.536 3.215 -2.054 0.6560]; fprintf('\nConvert DIRECT-form to CASCADE-form : \n');
[b0, Bc, Ac] = dir2cas(b, a) fprintf('\nConvert DIRECT-form to PARALLEL-form : \n');
[C, Bp, Ap] = dir2par(b, a) % -----------------------------------------
% START check
% -----------------------------------------
n = [0:7];
delta = impseq(0, 0, 7)
%format long
format short
hcas = casfiltr(b0, Bc, Ac, delta)
hpar = parfiltr(C, Bp, Ap, delta)
hdir = filter(b, a, delta)
% -------------------------------------------
% END check
% ------------------------------------------- figure('NumberTitle', 'off', 'Name', 'P6.5 hcas(n), hpar(n) and hdir(n)')
set(gcf,'Color','white');
subplot(3,1,1); stem(n, hcas);
xlabel('n'); ylabel('hcas(n)');
title('hcas(n)'); grid on;
subplot(3,1,2); stem(n, hpar);
xlabel('n'); ylabel('hpar(n)');
title('hpar(n)'); grid on;
subplot(3,1,3); stem(n, hdir);
xlabel('n'); ylabel('hdir(n)');
title('hdir(n)'); grid on;

  运行结果:

串联形式的系数

并联形式的系数

《DSP using MATLAB》Problem 6.5的更多相关文章

  1. 《DSP using MATLAB》Problem 7.27

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  2. 《DSP using MATLAB》Problem 7.26

    注意:高通的线性相位FIR滤波器,不能是第2类,所以其长度必须为奇数.这里取M=31,过渡带里采样值抄书上的. 代码: %% +++++++++++++++++++++++++++++++++++++ ...

  3. 《DSP using MATLAB》Problem 7.25

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  4. 《DSP using MATLAB》Problem 7.24

    又到清明时节,…… 注意:带阻滤波器不能用第2类线性相位滤波器实现,我们采用第1类,长度为基数,选M=61 代码: %% +++++++++++++++++++++++++++++++++++++++ ...

  5. 《DSP using MATLAB》Problem 7.23

    %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output Info a ...

  6. 《DSP using MATLAB》Problem 7.16

    使用一种固定窗函数法设计带通滤波器. 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  7. 《DSP using MATLAB》Problem 7.15

    用Kaiser窗方法设计一个台阶状滤波器. 代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  8. 《DSP using MATLAB》Problem 7.14

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  9. 《DSP using MATLAB》Problem 7.13

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...

  10. 《DSP using MATLAB》Problem 7.12

    阻带衰减50dB,我们选Hamming窗 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

随机推荐

  1. shell 整数条件判断

    两个整数的比较 '整数1 -eq 整数2' 判断整数1是否和整数2相等(相等为真) '整数1 -ne 整数2' 判断整数1是否和整数2不相等(不相等位置) '整数1 -gt 整数2' 判断整数1是否大 ...

  2. ASP.Net MVC(4) 之js css引用与压缩

    资源引用 可以用即可以直接使用“~”来表示根目录. 引入js <script src="~/Areas/OrderManage/JS/Form.js"></scr ...

  3. learning shell display alert function

    [Purpose]        Shell print function base on err info wrn ext output level   [Eevironment]        U ...

  4. svg 学习笔记

    http://git.oschina.net/heboliufengjie/demo/tree/master/svg?dir=1&filepath=svg&oid=3a44203972 ...

  5. jsp标签之jsp:setProperty用法

    参考:http://blog.csdn.net/wanghaishanren/article/details/2047400

  6. redis:集群配置

    一.redis集群相关 1.概念:redis集群是通过数据分区提供可用性的,这样即使一部分节点失效也可以继续处理请求. 2.原理:集群使用数据分片实现,一个redis集群包括16384个哈希槽,数据库 ...

  7. Mac下安装ipython与jupyter

    IPython从Python发展而来,更倾向于科学计算.互联网数据分析更喜欢用. 首先切换root用户: sudo su - pip3自动安装ipython yuchaodeMacBook-Pro:~ ...

  8. requests(第三方模块) 请求、登录、下载网页

    import requests  #http://docs.python-requests.org/en/latest/api/ 说明文档 ''' requests.request(method,ur ...

  9. vector容器的注意事项

    1.容器是指对象的集合,每一个元素都是一个对象,并且对象的类型相同.可以使用索引去访问容器中的对象. 2.由于容器中存放的是对象,所以引用无法成为vector的成员. 3.容器的初始化,与string ...

  10. [Leetcode 392]判断子序列 Is Subsequence

    [思路] 判断s是否为t的子串,所以length(s)<=length(t).于是两个指针,一次循环. 将s.t转换为数组p1.p2. i为过程中s的匹配长度. i=0空串,单独讨论返回true ...