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 #49439 is a reply to message #49342] Thu, 20 July 2006 12:44 Go to previous messageGo to previous message
Steve Eddins is currently offline  Steve Eddins
Messages: 9
Registered: July 2001
Junior Member
Steve Eddins wrote:
> 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;

Whoops, forgot which newsgroup I was in, sorry. The above code line is
MATLAB syntax. Replace it with suitable IDL syntax.

--
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: Sat Oct 11 05:44:35 PDT 2025

Total time taken to generate the page: 0.47659 seconds