make phase of fft shifted

200 views Asked by At

I wanna get fft of this discrete time signal, A=ones(1,11), and I got it. I ploted the three dimensional graph of fft.

Here is the MATLAB source code.

A=ones(1,11);
N=2^10;
k=1:N;
k2=1:11;
stem(k2,A);
figure(2);
FFT_A=fft(A,N);
subplot(1,2,1);
plot(k,abs((FFT_A)))
grid on
subplot(1,2,2);
plot(k,angle((FFT_A)))
grid on
figure(3);
plot3(k,abs(FFT_A),angle(FFT_A))
% hold on
% plot3(k,abs((FFT_A).*exp(),angle((FFT_A).*exp()),'r')
grid on
axis([0 1500 -5 10 -10 10]);
xlabel('index');ylabel('abs of fft');zlabel('phase of fft');

Then, in class of signals and systems, professor said like this:

"Shift the phase of fft so that phase of the result are 0 and pi only. Plot the three dimensional graph before shifting and after shifting. Shifting means multiplying FFT_A by exp(-j*2*pi*k*n/N)."

what is the proper values of n and N? I don't know how to find it.

1

There are 1 answers

3
MPA On

EDIT:

If the FFT of x[i] is X[k], then the FFT of x[i-n] (signal shifted by n) is X[k]*exp(-2*pi*j*k*n/N), where j is the imaginary number and N is the number of entries in X[k].