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

Home » Public Forums » archive » vectorising versus loops
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: vectorising versus loops [message #38207 is a reply to message #38146] Tue, 24 February 2004 02:13 Go to previous messageGo to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> wrote:

> ;; Make a list of indices
> ii = lindgen(n_elements(x))
>
> ;; Select on X and the index variable
> wh = where(x GE 0 AND ii LT 200)

While this is an example of using the index variable,
this statement by itself can be shortened to

wh = where(x[0:199] ge 0)

Norbert
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: resizing image
Next Topic: IDL jobs anyone?

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

Current Time: Sat Oct 11 10:10:13 PDT 2025

Total time taken to generate the page: 0.88474 seconds