FFT of row and column vectors not equal?

4 ビュー (過去 30 日間)
Matt Raum
Matt Raum 2011 年 10 月 12 日
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 Center および File ExchangeFourier Analysis and Filtering についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by