FFT of row and column vectors not equal?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Akzeptierte Antwort
Wayne King
am 12 Okt. 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.
2 Kommentare
Wayne King
am 12 Okt. 2011
note that:
x = randn(10,1);
isequal(fft(x').',fft(x))
That gives you what you're looking for.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!