《DSP using MATLAB》示例Example5.12

代码:
n = 0:10; x = 10*(0.8) .^ n; y = cirshftt(x,6,15);
n = 0:14; x = [x, zeros(1,4)];
%% -----------------------------------------------------------------
%% START a
%% -----------------------------------------------------------------
figure('NumberTitle', 'off', 'Name', 'Exameple5.12 ')
set(gcf,'Color','white');
subplot(2,1,1); stem(n,x); title('Original sequence x(n)'); axis([-1,15,-1,11]);
xlabel('n'); ylabel('x(n)'); grid on;
subplot(2,1,2); stem(n,y); title('Circularly shifted sequence , N = 15'); axis([-1,15,-1,11]);
xlabel('n'); ylabel('x((n-6) mod 15'); grid on;
%% -----------------------------------------------------------------
%% END a
%% -----------------------------------------------------------------
运行结果:

牢记:
1、如果你决定做某事,那就动手去做;不要受任何人、任何事的干扰。2、这个世界并不完美,但依然值得我们去为之奋斗。

浙公网安备 33010602011771号