help-octave
[Top][All Lists]

## Re: FFT output changes depending on row column vector

 From: Miroslaw Kwasniak Subject: Re: FFT output changes depending on row column vector Date: Tue, 14 Apr 2009 10:52:38 +0200 User-agent: Mutt/1.5.9i

```On Tue, Apr 14, 2009 at 12:38:51PM +1000, Keith Bannister wrote:
> 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.

Yes, it does ;)

> 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')')
^^^
look here

Operator "'" does conjugate (Hermitian) transpose.
If you want only plain transpose use ".'" :

x=exp(2*pi()*I()*4*[1:32]/32);sumsq(fft(x) - fft(x.').'),[maxv, maxi]
= max(abs(fft(x))),[maxv, maxi] = max(abs(fft(x.').'))
ans = 0
maxv = 32
maxi = 5
maxv = 32
maxi = 5

```