首页 > 其他 > 详细

DSP using MATLAB 示例Example2.4

时间:2016-10-31 09:07:39      阅读:187      评论:0      收藏:0      [点我收藏+]

技术分享

n = [0:10]; x = stepseq(0,0,10) - stepseq(10,0,10); 
[xe,xo,m] = evenodd(x,n);

set(gcf,‘Color‘,[1,1,1])                  % 改变坐标外围背景颜色
stem(n,x); title(‘Rectangular Pulse‘);
xlabel(‘n‘); ylabel(‘x(n)‘) ; axis([-10,10,0,1.2])
grid on

figure
set(gcf,‘Color‘,[1,1,1]) 
stem(m,xe); title(‘Even Part‘);
xlabel(‘n‘); ylabel(‘xe(n)‘); axis([-10,10,0,1.2])
grid on

figure
set(gcf,‘Color‘,‘white‘)
stem(m,xo); title(‘Odd Part‘);
xlabel(‘n‘); ylabel(‘xe(n)‘); axis([-10,10,-0.6,0.6])
grid on

结果:

技术分享  

技术分享

技术分享

 

DSP using MATLAB 示例Example2.4

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

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