代码:

%% -------------------------------------------------
%% 1 x(n)=2δ(n-2)+3u(n-3)
%% -------------------------------------------------
b = [0, 0, 2, 1]; a = [1, -1]; % [R, p, C] = residuez(b, a)
Mp = (abs(p))' % pole magnitudes
Ap = (angle(p))'/pi % pole angle in pi units [delta, n] = impseq(0, 0, 7); x1_chk = filter(b, a, delta) x1_ori = 2 * impseq(2, 0, 7) + 3 .* stepseq(3, 0, 7) figure('NumberTitle', 'off', 'Name', 'Problem 4.3 X1(z) pole-zero')
set(gcf,'Color','white');
zplane(b, a);
title('pole-zero plot'); grid on; %% ----------------------------------------------------------------------------
%% 2 x(n)=[3*0.75^n*cos(0.3πn)]u(n) + [4*0.75^n*sin(0.3πn)]u(n)
%% ----------------------------------------------------------------------------
b = [3, -3*0.75*cos(0.3*pi) + 4*0.75*sin(0.3*pi) ];
a = [1, -2*0.75*cos(0.3*pi), 0.75*0.75]; [R, p, C] = residuez(b, a)
Mp = (abs(p))' % pole magnitudes
Ap = (angle(p))'/pi % pole angle in pi units [delta, n] = impseq(0, 0, 7); x2_chk = filter(b, a, delta) x2_ori = ( 3*(0.75 .^ n) .* cos(0.3*pi*n) + 4*(0.75 .^ n) .* sin(0.3*pi*n) ) .* stepseq(0, 0, 7) figure('NumberTitle', 'off', 'Name', 'Problem 4.3 X2(z) pole-zero')
set(gcf,'Color','white');
zplane(b, a);
title('pole-zero plot'); grid on;

  运行结果:

2、第2小题的z变换,有一对共轭极点;

3、求z变换

代码:

%% ------------------------------------------------------------------------
%% 3 x(n)=n*sin(πn/3)u(n) + (0.9)^n*u(n-2)
%% ------------------------------------------------------------------------
b1 = [0, sqrt(3)/2, 0, -sqrt(3)/2]; nb1 = [0:3];
a1 = [1, -2, 3, -2, 1]; na1 = [0:4];
b2 = [0, 0, 0.81]; nb2 = [0:2];
a2 = [1, -0.9]; na2 = [0:1]; [a, na] = conv_m(a1, na1, a2, na2); [b11, nb11] = conv_m(b1, nb1, a2, na2);
[b12, nb12] = conv_m(a1, na1, b2, nb2); [b, nb] = sigadd(b11, nb11, b12, nb12); [R, p, C] = residuez(b, a)
Mp = (abs(p))' % pole magnitudes
Ap = (angle(p))'/pi % pole angle in pi units [delta, n] = impseq(0, 0, 7); x3_chk = filter(b, a, delta) x3_ori = ( n .* sin(pi*n/3) ) .* stepseq(0, 0, 7) + (0.9 .^ n) .* stepseq(2, 0, 7) figure('NumberTitle', 'off', 'Name', 'Problem 4.3 X3(z) pole-zero')
set(gcf,'Color','white');
zplane(b, a);
title('pole-zero plot'); grid on;

  运行结果:

4、求z变换

代码:

%% ------------------------------------------------------------------------
%% 4 x(n)=[n^2*(2/3)^(n-2)]u(n-1)
%% ------------------------------------------------------------------------
b1 = [0, 0, 1, 0, -4/9]; nb1 = [0:4];
a1 = [1, -8/3, 24/9, -32/27, 16/81]; na1 = [0:4];
b2 = [0, 3]; nb2 = [0:1];
a2 = [1, -4/3, 4/9]; na2 = [0:2];
b3 = [0, -3/2]; nb3 = [0:1];
a3 = [1, -2/3]; na3 = [0:1]; [a22, na22] = conv_m(a2, na2, a3, na3); [b11, nb11] = conv_m(b2, nb2, a3, na3);
[b12, nb12] = conv_m(b3, nb3, a2, na2); [b22, nb22] = sigadd(b11, nb11, b12, nb12); [a, na] = conv_m(a1, na1, a22, na22); [b13, nb13] = conv_m(b1, nb1, a22, na22);
[b14, nb14] = conv_m(a1, na1, b22, nb22); [b, nb] = sigadd(b13, nb13, b14, nb14); [R, p, C] = residuez(b, a)
Mp = (abs(p))' % pole magnitudes
Ap = (angle(p))'/pi % pole angle in pi units [delta, n] = impseq(0, 0, 7); x4_chk = filter(b, a, delta) x4_ori = (n.*n) .* (2/3).^(n-2) .* stepseq(1, 0, 7) figure('NumberTitle', 'off', 'Name', 'Problem 4.3 X4(z) pole-zero')
set(gcf,'Color','white');
zplane(b, a);
title('pole-zero plot'); grid on;

  运行结果:

5、求z变换

代码:

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

  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. 生成全球唯一标识GUID

    有时候我们操作数据的时候需要给这些数据一些编码,而这些编码又希望永远不会重复!这个时候微软的C#给了我们一个函数,这个函数产生的编码全球唯一,永远不会重复! 方法如下: 1.C#生成方式 string ...

  2. UEditor自动调节宽度

    UEditor自动调节宽度 一.总结 一句话总结:ueditor是网页的产物,没有API我们照样可以像调网页元素那样调,一样的,这里是改变插件的css样式实现 启示: 百度 文档 引擎 ueditor ...

  3. Kafka特性

    ———————————————————————————————————————————————— [关键原理] 1.消息文件存储(消息堆积能力) 2.消息topic分区 3.消息顺序的保证 4.拉模型 ...

  4. oracle 临时表的使用

    在oracle中,临时表分为会话级别(session)和事务级别(transaction)两种. 会话级的临时表在整个会话期间都存在,直到会话结束:事务级别的临时表数据在transaction结束后消 ...

  5. python怎样压缩和解压缩ZIP文件

    https://zhidao.baidu.com/question/1498409764366387259.html

  6. border可以这样给控件加边框

    <Border.BorderBrush>         <SolidColorBrush Color="Red" Opacity="0" / ...

  7. Confluence 6 的 Crowd 权限

    只读(Read Only) 从 Crowd 上获取的用户,用户组和用户组成员信息只具有读取权限,你只能在 Crowd 上对你的配置进行修改.你不能通过你的应用程序管理员界面修改,用户,用户组,用足成员 ...

  8. 『Numpy学习指南』排序&索引&抽取函数介绍

    排序: numpy.lexsort(): numpy.lexsort()是个排字典序函数,因为很有意思,感觉也蛮有用的,所以单独列出来讲一下: 强调一点,本函数只接受一个参数! import nump ...

  9. CSS单位分析

    px:单位代表像素,1px代表一个像素点. %:设置子元素为父容器的占比. em:代表该元素中一个字体所占字符,常用在文字首行缩进.其具有继承性. rem:始终代表html中的字符所在位置. vm:1 ...

  10. python-day52--前端html、css

    一.html需掌握的: 1. img标签 属性:src alt title width height 2. a标签 属性:href target 3. ul 标签及li 标签,二者都是块级标签 ul ...