comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL FFT vs MATLAB FFT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL FFT vs MATLAB FFT [message #32443] Tue, 08 October 2002 11:01 Go to previous message
Don J Lindler is currently offline  Don J Lindler
Messages: 19
Registered: April 2001
Junior Member
> Argh.... it is a bad day when I need to sort out both Matlab's and IDL's
> FFT functions...
>
> Assuming that, IDL's FFT function uses a one-sided format, and divides
> by N on the forward transform and MATLAB's FFT function uses a
> one-sided format and divides by N on the inverse transform, I still am
> having difficulty comparing the FFT results from each.
>
> In Matlab:
>
>>> fft(eye(4))
>
> ans =
> 1.0000 1.0000 1.0000 1.0000
> 1.0000 0 - 1.0000i -1.0000 0 + 1.0000i
> 1.0000 -1.0000 1.0000 -1.0000
> 1.0000 0 + 1.0000i -1.0000 0 - 1.0000i
>
> IDL> print, 4*fft(identity(4),/double)
> (1.0000000,0.0000000) (0.0000000, 0.0000000) (0.0000000,0.0000000)
(0.0000000, 0.0000000)
> (0.0000000,0.0000000) (0.0000000,-3.0628711e-17) (0.0000000,0.0000000)
(1.0000000,3.0628711e-17)
> (0.0000000,0.0000000) (0.0000000, 0.0000000) (1.0000000,0.0000000)
(0.0000000, 0.0000000)
> (0.0000000,0.0000000) (1.0000000,-3.0628711e-17) (0.0000000,0.0000000)
(0.0000000,3.0628711e-17)
>
> Can someone please explain how and why these are different?
>

fft in matlab only does a 1-D transform. Use fft2.

Don
[Message index]
 
Read Message
Read Message
Previous Topic: IDL FFT vs MATLAB FFT
Next Topic: Re: 2D FFT help

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 12:46:32 PDT 2025

Total time taken to generate the page: 1.09790 seconds