《DSP using MATLAB》Problem 4.23
代码:
%% ------------------------------------------------------------------------
%% 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的更多相关文章
- 《DSP using MATLAB》Problem 7.23
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output Info a ...
- 《DSP using MATLAB》Problem 6.23
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 5.22
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% O ...
- 《DSP using MATLAB》Problem 5.2
代码: %% ---------------------------------------------------------------------------------- %% Output ...
- 《DSP using MATLAB》Problem 4.15
只会做前两个, 代码: %% ---------------------------------------------------------------------------- %% Outpu ...
- 《DSP using MATLAB》Problem 8.34
今天下了小雨,空气中泛起潮湿的味道,阴冷的感觉袭来,心情受到小小影响. 代码: hp2lpfre子函数 function [wpLP, wsLP, alpha] = hp2lpfre(wphp, ws ...
- 《DSP using MATLAB》Problem 8.30
10月1日,新中国70周岁生日,上午观看了盛大的庆祝仪式,整齐的方阵,先进的武器,尊敬的先辈英雄,欢乐的人们,愿我们的 国家越来越好,人民生活越来越好. 接着做题. 代码: %% ---------- ...
- 《DSP using MATLAB》Problem 7.34
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- 《DSP using MATLAB》Problem 7.30
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
随机推荐
- 为什么需要API网关?
目录 0:00 微服务与网关(Microservices & API Gateways) 大家好,我叫Macro,今天我们谈论有关微服务和网关的话题.我是Mashape的CTO,也同时是开源网 ...
- ArcGIS 要素闪烁
ArcGIS 要素闪烁 通过双击要素图例,闪烁定位到要素,并且闪烁一段时间: IFeatureLayer featureLayer = layer as IFeatureLayer; ...
- 20170728xlVba还是这个混蛋
Public Sub Main22() If Now() >= #1/1/2018# Then Exit Sub Dim strText As String Dim Reg As Object, ...
- hdu-2897-巴什博弈
邂逅明下 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- nyoj1248(阅读理解???)
海岛争霸 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等.加勒比海盗,你知道吧?杰克船长驾驶着自己 ...
- UVA-12304 Race(递推)
题目大意:求n个人比赛的所有可能的名次种数.比如:n=2时,有A第一B第二.B第一A第二.AB并列第一三种名次. 题目解析:既然是比赛,总有第一名.第一名的人数可能是i (1≤i≤n),则剩下待定的人 ...
- java使用HttpClient
HttpClient常用的包有两个 org.apache.http.client以及org.apache.commons.httpclient 我常用的是org.apache.http.client. ...
- spark出现task不能序列化错误的解决方法 org.apache.spark.SparkException: Task not serializable
import org.elasticsearch.cluster.routing.Murmur3HashFunction; import org.elasticsearch.common.math.M ...
- 新手也能学会本地调试微信,natapp 官网映射
本地调试微信的新手指引~ 照着配置,一定可以配置成功,实现本地调试微信,公司好几个同事按照我写的步骤,都独立配成功了. 1.首选在natapp注册一个账号,申请免费隧道或者购买隧道,我买了一个月9元的 ...
- Python Django 之 Model
一.Model建表步骤 1. 2. 3. 二.单表的增删改查 1.insert 1)方法一 book.objects.create( title="疯狂外星人", price=10 ...