FFT of row and column vectors not equal?

4 次查看(过去 30 天)
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:
x=rand(4,1);[fft(x),fft(x')']
and the fft outputs are complex conjugates. The difference in output is even more apparent when using a complex vector:
x=rand(4,1)+1i*rand(4,1);[fft(x),fft(x')']
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.

采纳的回答

Wayne King
Wayne King 2011-10-12
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.
  2 个评论
Wayne King
Wayne King 2011-10-12
note that:
x = randn(10,1);
isequal(fft(x').',fft(x))
That gives you what you're looking for.
Matt Raum
Matt Raum 2011-10-12
That does the trick, I didn't realize the ' also conjugates numbers. Thanks Wayne!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by