码迷,mamicode.com
首页 > 其他好文 > 详细

《DSP using MATLAB》示例Example5.14

时间:2016-12-10 09:10:35      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:ges   pre   log   技术   number   art   blog   end   示例   

技术分享

代码:

x1 = [1,2,2]; x2 = [1,2,3,4]; y = circonvt(x1,x2,4)

n1 = 0:1:length(x1)-1;
n2 = 0:1:length(x2)-1;

ny = 0:1:length(y)-1;

%% -----------------------------------------------------------------
%%                  START   a
%% -----------------------------------------------------------------
figure(‘NumberTitle‘, ‘off‘, ‘Name‘, ‘Exameple5.14 ‘)
set(gcf,‘Color‘,‘white‘); 
subplot(3,1,1); stem(n1,x1); title(‘sequence x1(n)‘); axis([0,5,0,5]);
xlabel(‘n‘); ylabel(‘x1(n)‘); grid on;
subplot(3,1,2); stem(n2,x2); title(‘sequence x2(n)‘); axis([0,5,0,5]);
xlabel(‘n‘); ylabel(‘x2(n)‘); grid on;
subplot(3,1,3); stem(ny,y); title(‘Circularly convolution sequence y(n)‘); axis([0,5,0,20]);
xlabel(‘n‘); ylabel(‘y(n)‘); grid on;


%% -----------------------------------------------------------------
%%                  END   a
%% -----------------------------------------------------------------

  运行结果:

技术分享

技术分享

 

《DSP using MATLAB》示例Example5.14

标签:ges   pre   log   技术   number   art   blog   end   示例   

原文地址:http://www.cnblogs.com/ky027wh-sx/p/6154763.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!