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

Home » Public Forums » archive » FFT with NANs in an array
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: FFT with NANs in an array [message #49440 is a reply to message #49342] Thu, 20 July 2006 12:42 Go to previous messageGo to previous message
Steve Eddins is currently offline  Steve Eddins
Messages: 9
Registered: July 2001
Junior Member
adisn123@yahoo.com wrote:
> Hi,
>
> I'm trying to fourier transform a spacial domain image to frequency
> domain using FFT function in IDL.
>
> My image has quite a bit of NANs in an array, about 5%.
>
> When I use FFT into the image, it doesn't give me any errors, but when
> I inversely fourier transform after
>
> filtering, it gives a little funky result.

I would have expected you to get a VERY funky result. Since every
output element of an FFT depends on every input element, I'd expect
every output element of your result to be NaN.

> How do I make FFT ignore NANs in their job or filtering?

I think you'll need to explicitly replace the NaNs with 0s, like this:

A(isnan(A)) = 0;

--
Steve Eddins
http://blogs.mathworks.com/steve
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLgrPolygon with different colors for shading and lines
Next Topic: Re: IDL_IDLBridge in Virtual Machine

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

Current Time: Sun Oct 12 01:04:59 PDT 2025

Total time taken to generate the page: 5.12300 seconds