代码:

%% ----------------------------------------------------------------------------
%% 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. javascript异步编程方案汇总剖析

    code[class*="language-"] { padding: .1em; border-radius: .3em; white-space: normal; backgr ...

  2. 多年未写过java了

    java面试必须了解和记忆的知识点(linux,nginx,数据库之类的暂时不考虑了) java面试的115常见问题,这个博客还是不过的推荐一下吧 http://www.importnew.com/1 ...

  3. Windows7安装JDK的环境变量设置javac不是内部命令或外部命令

    转自:http://bbs.gfan.com/android-5941970-1-1.html Windows7安装JDK的环境变量设置 Windows7 X64安装“jdk-6u26-windows ...

  4. [.NET开发] C#编程调用Cards.dll实现图形化发牌功能示例

    本文实例讲述了C#编程调用Cards.dll实现图形化发牌功能.分享给大家供大家参考,具体如下: using System; using System.Collections.Generic; usi ...

  5. English trip -- VC(情景课)4 A Health

    Word doctor doctor's office medicine   [ˈmɛdɪsɪn]  n. 药:医学:内科:巫术  vt. 用药物治疗:给…用药 pill  n. 药丸 nurse   ...

  6. 使用API失效供应商地址Demo(转)

    原文地址  使用API失效供应商地址Demo DECLARE lv_return_status ) := NULL; ln_msg_count NUMBER; lv_errmsg ); lt_vend ...

  7. JFace下ApplicationWindow关闭窗口时结束进程

    /** * Configure the shell. * @param newShell */ @Override protected void configureShell(Shell newShe ...

  8. Centos中彻底删除Mysql(rpm、yum安装的情况)

    [root@data lib]# rpm -qa¦grep mysqlmysql-5.5.25-1.el6.remi.i686mysql-libs-5.5.25-1.el6.remi.i686comp ...

  9. sgu 130Circle dp

    130. Circle time limit per test: 0.25 sec. memory limit per test: 4096 KB On a circle border there a ...

  10. Android消息通信 第三方开源项目EventBus 的用法

    EventBus是github上的一个第三方开发库,其在github上的项目主页地址:https://github.com/greenrobot/EventBus EventBus的消息模型是消息发布 ...