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

Home » Public Forums » archive » Re: Arrays with NaN values
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: Arrays with NaN values [message #41272 is a reply to message #41266] Sun, 03 October 2004 22:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> Ok, David, but I'm using this code to put zeros in the place of Nan
>
> Image=(0*(where(float(finite Image[*,*],/Nan)))) + $
> Image*(where(NOT float(finite *Image[*,*],/Nan))))
>
> I guess I'm not using "where" function correctly, once it doesn't
> work.

Humm. Well that code looks a little strange. :-)

I think I would try something like this:

index = Where(Finite(image) EQ 0, count)
IF count NE 0 THEN image[index] = 0

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Map_grid options
Next Topic: General 3D graphics advise required

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

Current Time: Sun Oct 12 06:07:44 PDT 2025

Total time taken to generate the page: 0.80047 seconds