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

《DSP using MATLAB》示例Example4.4

时间:2016-11-26 09:24:21      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:off   -668   代码   技术分享   ber   length   ima   png   img   

技术分享

 

代码:

x1 = [2, 3, 4]; x2 = [3, 4, 5, 6];            % x1 x2 sequences
% n1 = 0:1:2; n2 = 0:1:3;
n1 = 0:1:length(x1)-1; n2 = 0:1:length(x2)-1;

[x3, n3] = conv_m(x1, n1, x2, n2);

figure(‘NumberTitle‘, ‘off‘, ‘Name‘, ‘Example4.4 x1 & x2 sequence‘)
set(gcf,‘Color‘,‘white‘); 
subplot(2,1,1); stem(n1,x1); title(‘x1 sequence ‘);   xlabel(‘n‘); ylabel(‘x1(n)‘); grid on;
subplot(2,1,2); stem(n2,x2); title(‘x2 sequence ‘);   xlabel(‘n‘); ylabel(‘x2(n)‘); grid on;

figure(‘NumberTitle‘, ‘off‘, ‘Name‘, ‘Example4.4 x3 sequence‘)
set(gcf,‘Color‘,‘white‘); 
stem(n3,x3); title(‘x3 sequence‘); xlabel(‘n‘); ylabel(‘x3(n)‘); grid on;

  运行结果:

技术分享

技术分享

 

《DSP using MATLAB》示例Example4.4

标签:off   -668   代码   技术分享   ber   length   ima   png   img   

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

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