代码:

  1. %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. %% Output Info about this m-file
  3. fprintf('\n***********************************************************\n');
  4. fprintf(' <DSP using MATLAB> Problem 6.11 \n\n');
  5.  
  6. banner();
  7. %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8. b = [0.051 0.088 0.060 -0.029 -0.0690 -0.046]; nb = [0:5];
  9. a = [1.000 -1.340 1.478 -0.789 0.2320]; na = [0:4];
  10.  
  11. format short;
  12. fprintf('\nConvert DIRECT-form to PARALLEL-form : \n');
  13. [C, Bp, Ap] = dir2par(b, a)
  14. %C = 0;
  15.  
  16. fprintf('\nConvert DIRECT-form to CASCADE-form : \n');
  17. [b0, Bc, Ac] = dir2cas(b, a)
  18.  
  19. fprintf('\nConvert TF-form to SOS-form : \n');
  20. [sos, g] = tf2sos(b, a)
  21.  
  22. fprintf('\nConvert DIRECT-form to LATTICE-LADDER-form : \n');
  23. [P, R] = deconv(b, a)
  24. [p, np, r, nr] = deconv_m(b, nb, a, na)
  25. [Klr, Clr] = dir2ladr(R, a)
  26.  
  27. fprintf('\nConvert DIRECT-form to MATLAB LATTICE-LADDER-form : \n');
  28. [K, V] = tf2latc(R, a)
  29.  
  30. % -----------------------------------------
  31. % START check
  32. % -----------------------------------------
  33. n = [0:7];
  34. delta = impseq(0, 0, 7)
  35. %format long
  36. format short
  37. hcas = casfiltr(b0, Bc, Ac, delta)
  38.  
  39. hpar = parfiltr(C, Bp, Ap, delta)
  40.  
  41. hladr = ladrfilt(Klr, Clr, delta)
  42.  
  43. hdir = filter(b, a, delta)
  44. % -------------------------------------------
  45. % END check
  46. % -------------------------------------------
  47.  
  48. figure('NumberTitle', 'off', 'Name', 'P6.11 hcas(n), hpar(n)')
  49. set(gcf,'Color','white');
  50. subplot(2,1,1); stem(n, hcas);
  51. xlabel('n'); ylabel('hcas(n)');
  52. title('hcas(n)'); grid on;
  53. subplot(2,1,2); stem(n, hpar);
  54. xlabel('n'); ylabel('hpar(n)');
  55. title('hpar(n)'); grid on;
  56.  
  57. figure('NumberTitle', 'off', 'Name', 'P6.11 hladr(n) hdir(n)')
  58. set(gcf,'Color','white');
  59. subplot(2,1,1); stem(n, hladr);
  60. xlabel('n'); ylabel('hladr(n)');
  61. title('hladr(n)'); grid on;
  62. subplot(2,1,2); stem(n, hdir);
  63. xlabel('n'); ylabel('hdir(n)');
  64. title('hdir(n)'); grid on;

  运行结果:

这里只放并联形式系数的图,其它形式系数不附图了。

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

  1. 《DSP using MATLAB》Problem 7.11

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

  2. 《DSP using MATLAB》Problem 5.11

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

  3. 《DSP using MATLAB》Problem 4.11

    代码: %% ---------------------------------------------------------------------------- %% Output Info a ...

  4. 《DSP using MATLAB》Problem 8.11

    代码: %% ------------------------------------------------------------------------ %% Output Info about ...

  5. 《DSP using MATLAB》Problem 7.16

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

  6. 《DSP using MATLAB》Problem 7.6

    代码: 子函数ampl_res function [Hr,w,P,L] = ampl_res(h); % % function [Hr,w,P,L] = Ampl_res(h) % Computes ...

  7. 《DSP using MATLAB》Problem 5.21

    证明: 代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

  8. 《DSP using MATLAB》Problem 5.20

    窗外的知了叽叽喳喳叫个不停,屋里温度应该有30°,伏天的日子难过啊! 频率域的方法来计算圆周移位 代码: 子函数的 function y = cirshftf(x, m, N) %% -------- ...

  9. 《DSP using MATLAB》Problem 5.14

    说明:这两个小题的数学证明过程都不会,欢迎博友赐教. 直接上代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

随机推荐

  1. laravel的日志服务

    日志服务使用: $app=app(); $log=$app->make('log'); $log->info('post_index',['data'=>'this is post ...

  2. DMA-总结

    概念DMA “Direct Memory Access(存储器直接访问).这是指一种高速的数据传输操作,允许在外部设备和存储器之间直接读写数据.整个数据传输操作在一个称为"DMA控制器&qu ...

  3. Uboot USB模式(RK3288变砖头的解决办法)

    RK3288启动后有三种模式,可以分别进行操作. 第一种是normal也就是正常的启动模式.这个模式无法刷固件.一般板子通电就是这个模式 第二种是loader模式.就是刷固件模式.这个模式可以刷各种i ...

  4. .NetCore发布到Centos docker

    将.netcore mvc项目发布到centos7的docker中.环境 vmware14+Centos7+docker-ce 1.使用vs将.netcoremvc项目发布到本地,修改发布后的目录 名 ...

  5. [转载]mysqlcreate新建用户host使用%,本地无法连接原因及解决方法

    转载自 http://www.2cto.com/database/201307/225781.html mysql,因为root权限过高,所以新建一用户appadmin,权限仅为要用到的数据库.创建语 ...

  6. Python Django 之 基于JQUERY的AJAX 登录页面

    一.基于Jquery的Ajax的实现 1.url 2.vews 3.templates

  7. C++11新特性,bind,基于对象

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

  8. ES6-循环

    forEach 方法来遍历数组,不能使用break语句中断循环,也不能使用return语句返回到外层函数 myArray.forEach(function (value) { console.log( ...

  9. 首次编译Java小程序

    public class helloworld { public static void main(string[] args) { system.out.println("hello wo ...

  10. python的编码与转码

    编码问题一直是初学者的难题,搞不明白.甚至一些程序员做了多年的程序,但是编码一直整不清,下面就来认识认识编码吧. ASCII(American Standard Code for Informatio ...