博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
《DSP using MATLAB》 Problem 4.9
阅读量:5064 次
发布时间:2019-06-12

本文共 2265 字,大约阅读时间需要 7 分钟。

    代码:

%% ----------------------------------------------------------------------------%%            Output Info about this m-filefprintf('\n***********************************************************\n');fprintf('        
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;

  运行结果:

转载于:https://www.cnblogs.com/ky027wh-sx/p/8445409.html

你可能感兴趣的文章
Eclipse 调试的时候Tomcat报错启动不了
查看>>
ES6内置方法find 和 filter的区别在哪
查看>>
Android入门之文件系统操作(二)文件操作相关指令
查看>>
Android实现 ScrollView + ListView无滚动条滚动
查看>>
java学习笔记之String类
查看>>
UVA 11082 Matrix Decompressing 矩阵解压(最大流,经典)
查看>>
jdk从1.8降到jdk1.7失败
查看>>
硬件笔记之Thinkpad T470P更换2K屏幕
查看>>
【知识库】-数据库_MySQL 的七种 join
查看>>
iOS开发——缩放图片
查看>>
HTTP之URL的快捷方式
查看>>
满世界都是图论
查看>>
配置链路聚合中极小错误——失之毫厘谬以千里
查看>>
代码整洁
查看>>
蓝桥杯-分小组-java
查看>>
Android Toast
查看>>
iOS开发UI篇—Quartz2D使用(绘制基本图形)
查看>>
docker固定IP地址重启不变
查看>>
桌面图标修复||桌面图标不正常
查看>>
JavaScript基础(四)关于对象及JSON
查看>>