代码:

%% ----------------------------------------------------------------------------
%% Output Info about this m-file
fprintf('\n***********************************************************\n');
fprintf(' <DSP using MATLAB> Problem 4.9 \n\n'); banner();
%% ---------------------------------------------------------------------------- %% -------------------------------------------------
%% 1 X(z)
%% ------------------------------------------------- b1 = [1, -2, 3, -4]; nb1 = [0:3]; a1 = [4, 3, -2, 1]; na1 = [0:3]; % [x1, nx1] = conv_m(b1, nb1, a1, na1) figure('NumberTitle', 'off', 'Name', 'Problem 4.9.1 X1(z)')
set(gcf,'Color','white');
stem(nx1, x1);
title('X1'); grid on; %% -------------------------------------------------
%% 2 X(z)
%% -------------------------------------------------
b2 = [1, -2, 3, 2, 1]; nb2 = [-2:2]; a2 = [1, 0, 0, 0, 0, 0, -1]; na2 = [-3:3]; % [x2, nx2] = conv_m(b2, nb2, a2, na2) figure('NumberTitle', 'off', 'Name', 'Problem 4.9.2 X2(z)')
set(gcf,'Color','white');
stem(nx2, x2);
title('X2'); grid on; %% -------------------------------------------------
%% 3 X(z)
%% -------------------------------------------------
b3 = [1, 1, 1]; nb3 = [0:2]; % [x3_1, nx3_1] = conv_m(b3, nb3, b3, nb3);
[x3, nx3] = conv_m(x3_1, nx3_1, b3, nb3)
figure('NumberTitle', 'off', 'Name', 'Problem 4.9.3 X3(z)')
set(gcf,'Color','white');
stem(nx3, x3);
title('X3'); grid on; %% -------------------------------------------------
%% 4 X4(z)=X1(z)X2(z)+X3(z)
%% -------------------------------------------------
[x4_1, nx4_1] = conv_m(x1, nx1, x2, nx2);
[x4, nx4] = sigadd(x4_1, nx4_1, x3, nx3)
figure('NumberTitle', 'off', 'Name', 'Problem 4.9.4 X4(z)')
set(gcf,'Color','white');
stem(nx4, x4);
title('X4'); grid on; %% -------------------------------------------------
%% 5 X(z)
%% -------------------------------------------------
b5 = [1, 0, -3, 0, 2, 0, 5, 0, -1]; nb5 = [1:9]; a5 = [4, 2, 3, 1]; na5 = [-4:-1]; % [x5, nx5] = conv_m(b5, nb5, a5, na5)
figure('NumberTitle', 'off', 'Name', 'Problem 4.9.5 X5(z)')
set(gcf,'Color','white');
stem(nx5, x5);
title('X5'); grid on;

  运行结果:

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

  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. http和WebSocket

    有关http和WebSocket 的区别网上有很多的质料. 个人在此仅仅是记录以下自己的学习心得,自己的理解. 1. http协议是用在应用层的协议,他是基于tcp协议的,http协议建立链接也必须要 ...

  2. 20170528xlVBA凑数一例

    Public Sub MakeUp() Dim Sht As Worksheet Set Sht = ThisWorkbook.Worksheets("设置") Dim Total ...

  3. Android动画(Animations)

    动画类型Android的animation由四种类型组成 XML中 alpha  : 渐变透明度动画效果 scale  :渐变尺寸伸缩动画效果 translate  : 画面转换位置移动动画效果 ro ...

  4. Dubbo项目一段时间后提供者消失

    Dubbo项目用了一段时间后发现接口不通了,错误500 打开监控中心发现提供者不见了 查看下日志文件发现报如下错 2018-08-06 15:10:18,008 [localhost-startSto ...

  5. 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题

    参考:https://blog.csdn.net/u012453843/article/details/69803244 解决执行脚本报syntax error: unexpected end of ...

  6. python 小练习 9

    还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下的图形: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 .............. 先 ...

  7. Tomcat类加载器破坏双亲委派

    转载:https://blog.csdn.net/qq_38182963/article/details/78660779 http://www.cnblogs.com/aspirant/p/8991 ...

  8. AIOps探索:基于VAE模型的周期性KPI异常检测方法——VAE异常检测

    AIOps探索:基于VAE模型的周期性KPI异常检测方法 from:jinjinlin.com   作者:林锦进 前言 在智能运维领域中,由于缺少异常样本,有监督方法的使用场景受限.因此,如何利用无监 ...

  9. powerDesigner16x64安装步骤

    PowerDesigner16x64_Evaluation安装 补一下 安装成功

  10. POJ 1166 暴力搜索 即 枚举

    e.... 米还是没有读懂题....T_T ..... e.... 这就是传说中的暴力吗....太血腥了....太暴力了...九重for循环....就这么赤裸裸的AC了.... 水是水了点..但是.. ...