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 #26296 is a reply to message #26295] Sat, 18 August 2001 04:10 Go to previous messageGo to previous message
Dominic R. Scales is currently offline  Dominic R. Scales
Messages: 12
Registered: April 2001
Junior Member
GB Smith wrote:
>
>> 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...

Hi GB,

is this what you are looking for?

e = b
e[where(b le 180)] = 0
e[where(b gt 180)] = 1

Cheers,
Dominic

--
Dipl. Phys. Dominic R. Scales | Aero-Sensing Radarsysteme GmbH
Tel: +49 (0)8153-90 88 90 | c/o DLR Oberpfaffenhofen
Fax: +49 (0)8153-908 700 | 82234 Wessling, Germany
WWW: aerosensing.de | email: Dominic.Scales@aerosensing.de
[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:44:20 PDT 2025

Total time taken to generate the page: 0.00381 seconds