代码:

%% ------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 4.23 \n\n'); banner();
%% ------------------------------------------------------------------------ % ----------------------------------------------------
% 1 H1(z)
% ---------------------------------------------------- b = [1, -0.866, -1.2278, 0.7938]; nb = [-1:2];
a = [1, -0.7, -0.81, 0.567]*0.7; na = [0:3]; % [p, np, r, nr] = deconv_m(b, nb, a, na) b1 = [-0.1660, -0.4178, 0.2268]
[R, p, C] = residuez(b1, a) Mp = (abs(p))'
Ap = (angle(p))'/pi %% ------------------------------------------------------
%% START a determine Y(z) and sketch
%% ------------------------------------------------------
figure('NumberTitle', 'off', 'Name', 'P4.23 Y(z) its pole-zero plot')
set(gcf,'Color','white');
zplane(b,a);
title('pole-zero plot'); grid on; %% ----------------------------------------------
%% END
%% ---------------------------------------------- % ------------------------------------
% h(n)
% ------------------------------------ [delta, n] = impseq(0, 0, 19);
h_check = filter(b, a, delta) % check sequence [delta1, n1] = sigshift(delta, n, -1);
h_answer1 = 1.4286*delta1;
h_answer2 = 0.2323*(-0.9).^n.*stepseq(0,0,19) - 1.1257*(0.9).^n.*stepseq(0,0,19) + 0.6563*(0.7).^n.*stepseq(0,0,19); % answer sequence [h_answer, n2] = sigadd(h_answer1, n1, h_answer2, n)

  运行结果:

Y(z)进行部分分式展开,

其留数及对应极点为:

零极点图如下

输出y(n)的前20个元素(这里变量名称h_check、h_answer用的不合适。)

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

  1. 《DSP using MATLAB》Problem 7.23

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

  2. 《DSP using MATLAB》Problem 6.23

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

  3. 《DSP using MATLAB》Problem 5.22

    代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% O ...

  4. 《DSP using MATLAB》Problem 5.2

    代码: %% ---------------------------------------------------------------------------------- %% Output ...

  5. 《DSP using MATLAB》Problem 4.15

    只会做前两个, 代码: %% ---------------------------------------------------------------------------- %% Outpu ...

  6. 《DSP using MATLAB》Problem 8.34

    今天下了小雨,空气中泛起潮湿的味道,阴冷的感觉袭来,心情受到小小影响. 代码: hp2lpfre子函数 function [wpLP, wsLP, alpha] = hp2lpfre(wphp, ws ...

  7. 《DSP using MATLAB》Problem 8.30

    10月1日,新中国70周岁生日,上午观看了盛大的庆祝仪式,整齐的方阵,先进的武器,尊敬的先辈英雄,欢乐的人们,愿我们的 国家越来越好,人民生活越来越好. 接着做题. 代码: %% ---------- ...

  8. 《DSP using MATLAB》Problem 7.34

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

  9. 《DSP using MATLAB》Problem 7.30

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

随机推荐

  1. Freemarker生成HTML静态页面

    这段时间的工作是做一个网址导航的项目,面向用户的就是一个首页,于是就想到了使用freemarker这个模板引擎来对首页静态化. 之前是用jsp实现,为了避免用户每次打开页面都查询一次数据库,所以使用了 ...

  2. sgu 116 Index of super-prime

    题意:用最少的super-prime组成n; 找出所有的super-prime数,只有202个.用完全背包记录能取到n值的最少数量.再找出7要哪些元素. #include <iostream&g ...

  3. CF-499div2-E-裴蜀定理

    E. Border time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...

  4. 关于InputStream类的available()方法

    要一次读取多个字节时,经常用到InputStream.available()方法,这个方法可以在读写操作前先得知数据流里有多少个字节可以读取.需要注意的是,如果这个方法用在从本地文件读取数据时,一般不 ...

  5. 87. Scramble String *HARD* 动态规划

    Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...

  6. postgresql数据库常用命令

    --获取数据库软件版本select version();--获取数据库启动时间select pg_postmaster_start_time();--获取配置文件最近load时间select pg_c ...

  7. Kubernetes设计架构

    官方文档:https://www.kubernetes.org.cn/doc-11 Kubernetes集群包含有节点代理kubelet和Master组件(APIs, scheduler, etc), ...

  8. html页面展示Json样式

    一般有些做后台数据查询,要把后台返回json数据展示到页面上,如果需要展示样式更清晰.直观.一目了然,就要用到html+css+js实现这个小功能 一.css代码 pre {outline: 1px ...

  9. canvas绘制直线

    HTML5 <canvas>元素用于图形的绘制,该元素只是图形容器,必须使用javascript脚本绘制图形创建一个画布:<canvas id="myCanvas" ...

  10. RabbitMQ整合spring

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...