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

Home » Public Forums » archive » why the variable become -NaN?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
why the variable become -NaN? [message #63250] Wed, 29 October 2008 21:21
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
HI~ every one. i got another question here. I have long program and
there is a part of it. The strange thing is , when I print at the
first place, 'target' is normal float number. but after the small
part, i print it again, it become -NaN, Why is that? any clues?
Thank you~~~

for jj= jjstr, jjend do begin
for ii= iistr, iiend do begin

disx=abs(glon-plon(ii,jj))
disy=abs(glat-plat(ii,jj))
dist=sqrt(disx*disx+disy*disy)
; must avoid missing data ("missing")
target=pdat(ii,jj)
;
if (mmselec eq 1) then begin
print,target
endif
;target still right here

if (dist LT Range and $
target NE missing) then begin
if(dist eq 0.0) then begin
wgt(ii,jj)= 1.
endif else begin
; wgt(ii,jj)= 1./(dist*dist)
wgt(ii,jj)= 1./dist
endelse

if (mmselec eq 1) then begin
print,target
endif
; it is not right any more :(
[Message index]
 
Read Message
Previous Topic: Looking for info about warping images in IDL!
Next Topic: CCD saturation

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

Current Time: Wed Oct 08 19:12:31 PDT 2025

Total time taken to generate the page: 0.00498 seconds