help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FFT output changes depending on row column vector


From: Peter L.
Subject: Re: FFT output changes depending on row column vector
Date: Tue, 14 Apr 2009 10:04:15 +0200

No,

that is the mathematically correct behaviour.

fft(x) is complex valued, so fft(x)' is the complex conjugate transpose
of the vector, and doing the operation you describe amounts to what is
called an involution: x(t) = x(-t) counting from zero.

This means that you get the vector reversed, except for the first
element x(0) which stays in place.

Try

sumsq(fft(x) - fft(x.').')

instead.

Cheers,

Peter.

tir, 14 04 2009 kl. 12:38 +1000, skrev Keith Bannister:
> Hi,
> 
> Please don't flame me, but I'm having a really weird issue.
> 
> I was hoping taking the FFT of a row would give the the same result as
> the transpose of the fft of a column. The FFT of a column seems to be
> some weird reversed version of what I expect.
> 
> Here's some code:
> 
> octave2.9:85> version
> ans = 2.9.9
> octave2.9:81> x = exp(2*pi()*I()*4*[1:32]/32);
> octave2.9:101> sumsq(fft(x) - fft(x')')
> ans =  2048.0
> octave2.9:102> [maxv, maxi] = max(abs(fft(x)))
> maxv =  32
> maxi =  5
> octave2.9:103> [maxv, maxi] = max(abs(fft(x')'))
> maxv =  32
> maxi =  29
> 
> The documentation (and google AFAIK) don't mention this. Do I have a
> duff installation or something?
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]