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

Home » Public Forums » archive » Re: a newbie question on code efficiency
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: a newbie question on code efficiency [message #26295 is a reply to message #26294] Sat, 18 August 2001 05:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
GB Smith (gogosgogos@usa.net) writes:

>> e = b GE cutoff
>>
>> Cheers,
>>
>> David
>
> well, i thought of that already and it just kept all the values above cutoff
> but did not set them to 1. my array has values between 0 and 255 and i want
> to set all the values higher than 180 to 1 and all the rest to 0.
>
> maybe i did not put it that clear in the first post :)
>
> sorry...

Uh, I think you must have tried this:

e = b > cutoff

I can assure you that this:

e = b GT cutoff

gives you a mask of 0s and 1s. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: object graphic / direct graphic
Next Topic: call_method

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

Current Time: Wed Oct 08 17:45:19 PDT 2025

Total time taken to generate the page: 0.00377 seconds