MATLAB code is given below with explanation.
clc;
close all;
clear all;
% let the sequence be
x = [1 1 1 1 1 ];
N = length(x);
% apply fft routine to get X[k]
X = fft(x);
% now swap the imaginary and real parts of X[k]
X1_real = imag(X);
X1_imag = real(X);
% now define swapped X[k]
X1 = X1_real + 1j* X1_imag;
% apply FFT routine to X1[k]
x1 = fft(X1);
% scale the sequence x1
x1 = x1/N
Result:
x1 =
Columns 1 through 5
0 + 1.0000i 0 + 1.0000i 0 + 1.0000i 0 + 1.0000i 0 + 1.0000i
It is observed that the signal x and x1 are not quite the same though their magnitudes are same. It needs to be a little modification to get the sequence x1 same as x by using the same routine fft.
modification:
instead of swapping the real and imaginary parts, parts of X[k], take conjugate of X[k] and apply fft routine to the same.
modified code:
% now conjugate of X[k]
X1 = conj(X);
% apply FFT routine to X1[k]
x1 = fft(X1);
% scale the sequence x1
x1 = x1/N
result:
x1 =
1 1 1 1 1
It is suggested that if you have an FFT subroutine for computing a length-N DFT, the...
The DFT is a sampled version of the DTFT of a finite-length sequence; i.e., N-1 (P9.25-1) Furthermore, an FFT algorithm is an efficient way to compute the values X Now consider a finite-length sequence xin] whose length is N samples.We want to evaluate X(z) the z-transform of the finite-length sequence, at the following points in the z-plane where ris a positive number. We have available an FFT algorithm (a) Plot the points z in the z-plane for the case N-8...
The DFT is a sampled version of the DTFT of a finite-length sequence; i.e., N-1 (P9.25-1) Furthermore, an FFT algorithm is an efficient way to compute the values X Now consider a finite-length sequence xin] whose length is N samples.We want to evaluate X(z) the z-transform of the finite-length sequence, at the following points in the z-plane where ris a positive number. We have available an FFT algorithm (a) Plot the points z in the z-plane for the case N-8...