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 #72599 is a reply to message #72598] Thu, 23 September 2010 06:41 Go to previous messageGo to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Sep 23, 9:28 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Sep 23, 10:20 am, Gray <grayliketheco...@gmail.com> wrote:
>
>
>
>
>
>> On Sep 22, 8:13 pm, Gray <grayliketheco...@gmail.com> wrote:
>
>>> On Sep 22, 4:59 pm, David Fanning <n...@dfanning.com> wrote:
>
>>>> 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.")
>
>>> Oh.  Oh, oh, oh.  Grrrrrr..... >:O
>
>> IDL> yb = 0 > (rebin(transpose(srcy),2,nsrc,/sample)+bs) < s[1]-1
>> IDL> print, where(yb[0,*] le 0)
>>            6           7          18          23          29
>
>> Even with the parentheses it still doesn't work.
>
> Did you not want it to be
>
> yb = 0 > (rebin(transpose(srcy),2,nsrc,/sample)+bs) < (s[1]-1)
>
> ?

Thank you. Sigh...
[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 11 16:11:36 PDT 2025

Total time taken to generate the page: 0.46483 seconds