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

Home » Public Forums » archive » Re: operator fails?
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: operator fails? [message #72614 is a reply to message #72608] Wed, 22 September 2010 13:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gray writes:

> Can anyone explain this?
>
> IDL> nsrc = n_elements(srcy)
> IDL> s = size(img,/dim)
> IDL> bs = rebin([-10,10],2,nsrc,/sample)
> IDL> yb = 0. > rebin(transpose(srcy),2,nsrc,/sample)+bs < s[1]-1
> IDL> print, n_elements(where(yb lt 0))
> 5
>
> How does yb ever become less than 0? Isn't the > operator in this
> usage supposed to prevent this?? Thanks.

This is one of the classic gotchas. You are going
to need some parentheses in that long line. Do you
see it? :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: isotropic keyword for surface?
Next Topic: NG Colorbar scaling

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

Current Time: Sat Oct 25 14:37:21 PDT 2025

Total time taken to generate the page: 0.88091 seconds