FFT of row and column vectors not equal?

5 views (last 30 days)
The Matlab 2010a documentation on the fft function explains that:
Y = fft(X) returns the discrete Fourier transform (DFT) of vector X, computed with a fast Fourier transform (FFT) algorithm.
I take this to mean that if x is a vector, then fft(x')' should be the same as fft(x). It turns out that this is not the case as can be verified by examining the output of the following command:
and the fft outputs are complex conjugates. The difference in output is even more apparent when using a complex vector:
In general, for a vector x of length N we find that
fft(x)[j] = fft(x')[(N-j)%N]
(here I have used C-style zero-based array subscripts and modulus operator b/c of the notational convenience).
The effect is to reverse the frequency axis (if that can be taken to correspond to the array index of the fft result), which is inconsequential if I'm looking at the magnitude of the fft of a real signal, however if I'm looking at the phase of the signal, or the signal is not real then the difference between the results is significant. So I'm wondering if I'm missing something here or if I should be interpreting the FFT result in a different way. Any input appreciated.
Incidentally, the same issue arises with the ifft function.

Accepted Answer

Wayne King
Wayne King on 12 Oct 2011
You have to use .' (dot transpose)
If you use the tranpose operator on a complex-valued vector, matrix in MATLAB, it returns the conjugate transpose by default.
Wayne King
Wayne King on 12 Oct 2011
note that:
x = randn(10,1);
That gives you what you're looking for.
Matt Raum
Matt Raum on 12 Oct 2011
That does the trick, I didn't realize the ' also conjugates numbers. Thanks Wayne!

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!