首页 > 其他 > 详细

《DSP using MATLAB》Problem5.23

时间:2018-08-10 10:16:21      阅读:145      评论:0      收藏:0      [点我收藏+]

 

技术分享图片

代码:

%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%%            Output Info about this m-file
fprintf(‘\n***********************************************************\n‘);
fprintf(‘        <DSP using MATLAB> Problem 5.23 \n\n‘);

banner();
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

% -------------------------------------------------------------------
%               
%                                
% -------------------------------------------------------------------
n = [0:6];
x = [1, 2, -3, 4, -5, 0, 0];
 
N = 7;
x_cir_fold = x(mod(-n, N)+1);

m = -1;

y = cirshftt(x_cir_fold, m, 7);
ny = [0:6];


figure(‘NumberTitle‘, ‘off‘, ‘Name‘, ‘P5.23 x(n) x((-n)) x((-8-n))‘)
set(gcf,‘Color‘,‘white‘); 
subplot(3,1,1); stem(n, x); 
xlabel(‘n‘); ylabel(‘x‘);
title(‘x(n), N=7‘);  grid on;
subplot(3,1,2); stem(n, x_cir_fold);  
xlabel(‘n‘); ylabel(‘‘);
title(‘x((-n)), N=7‘);  grid on;
subplot(3,1,3); stem(ny, y); 
xlabel(‘n‘); ylabel(‘y‘);
title(‘x((-8-n)), N=7‘);  grid on;

  运行结果:

技术分享图片

技术分享图片

 

《DSP using MATLAB》Problem5.23

原文:https://www.cnblogs.com/ky027wh-sx/p/9452752.html

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