《DSP using MATLAB》Problem5.23

代码:

%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%%            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;

  运行结果:

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

时间: 2024-10-07 00:41:14

《DSP using MATLAB》Problem5.23的相关文章

《DSP using MATLAB》示例Example 8.23

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 8.23 \n\n'); time_stam

《DSP using MATLAB》Problem 6.23

代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Problem 6.23 \n\n'); ba

《DSP using MATLAB》Problem 8.30

10月1日,新中国70周岁生日,上午观看了盛大的庆祝仪式,整齐的方阵,先进的武器,尊敬的先辈英雄,欢乐的人们,愿我们的 国家越来越好,人民生活越来越好. 接着做题. 代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n*******************************************

《DSP using MATLAB》示例Example 8.24

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 8.24 \n\n'); time_stam

《DSP using MATLAB》示例 Example 9.4

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 9.4 \n\n'); time_stamp

《DSP using MATLAB》示例Example 8.17

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 8.17 \n\n'); time_stam

《DSP using MATLAB》 示例 Example 9.12

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 9.12 \n\n'); time_stam

《DSP using MATLAB》示例Example 9.9

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 9.9 \n\n'); time_stamp

《DSP using MATLAB》示例Example 9.5

代码: %% ------------------------------------------------------------------------ %% Output Info about this m-file fprintf('\n***********************************************************\n'); fprintf(' <DSP using MATLAB> Exameple 9.5 \n\n'); time_stamp