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

Home » Public Forums » archive » Initialize new variable array with nan or -9999 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: Initialize new variable array with nan or -9999 values [message #87638 is a reply to message #87636] Thu, 20 February 2014 10:36 Go to previous messageGo to previous message
John Correira is currently offline  John Correira
Messages: 25
Registered: August 2011
Junior Member
On 02/20/2014 01:31 PM, Morgan Silverman wrote:
> Hello,
>
> This seems like it should be so simple but I can't figure out how to
> do it. I am creating a new array, distance=fltarr(304,336,500) and I
> want it to be initially filled with either nan or -9999. My results
> could possibly be 0.0 so I need to know where those are calculated
> values and not just part of the original array. Thank you.
>
> Sincerely, Morgan
>

Either

distance = fltarr(304,336,500,/NOZERO)
distance[*] = !values.f_nan

or

distance = make_array(304,336,500,/FLOAT,VALUE=!values.f_nan)



John
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with cgcmdwindow__define
Next Topic: Position, normal coordinates, and multiple images

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

Current Time: Fri Oct 10 00:50:27 PDT 2025

Total time taken to generate the page: 0.00494 seconds