首页 > 其他 > 详细

DSP using MATLAB 示例Example2.11

时间:2016-11-04 07:46:04      阅读:230      评论:0      收藏:0      [点我收藏+]

技术分享

上代码:

b = [1]; a = [1, -1, 0.9]; n = [-20:120];
h = impz(b,a,n);

set(gcf,‘Color‘,‘white‘); 
%subplot(2,1,1); 
stem(n,h); title(‘Impulse Response‘);
xlabel(‘n‘); ylabel(‘h(n)‘); grid on;


x = stepseq(0,-20, 120); s = filter(b,a,x);
figure; set(gcf,‘Color‘,‘white‘);
%subplot(2, 1,2); 
stem(n,x); title(‘Step Sequence‘);
xlabel(‘n‘); ylabel(‘x(n)‘); grid on;


figure; set(gcf,‘Color‘,‘white‘);
%subplot(2, 1,2); 
stem(n,s); title(‘Step Response‘);
xlabel(‘n‘); ylabel(‘s(n)‘); grid on;

结果:

技术分享

技术分享  

技术分享

 

DSP using MATLAB 示例Example2.11

原文:http://www.cnblogs.com/ky027wh-sx/p/6028944.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!