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

Home » Public Forums » archive » Re: [Q]IDL: Using WHERE.
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: [Q]IDL: Using WHERE. [message #5979 is a reply to message #5973] Tue, 19 March 1996 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
Joe Fitzgerald wrote:
>
> Where finds the non-zero elements of an array; e.g.

Huh?
If array=[30, 40, 10, 0]? Then B=[0,1]
If array=dist(10)-50., then B=-1

> array = FINDGEN(100)
> B = Where(array GT 20., count)
> B is an array containing the subscripts of ARRAY for values greater than
> 20.

Yes. If there are any (see above example)!

> Is there a way to use B to get the complementary values; i.e., the array
> of subscripts for which ARRAY is less than 20?



Uh! This is a set-up, isn't it?
Is my boss watching?
How about LESS THAN OR EQUAL TO? That would be complementary.

Why use B? Why not use...
C = Where(array LE 20., count)
if (count gt 0) then print, 'Hurray!'

If you must use B, then try using the uniq function.

--
Andrew F. Loughe (afl@cdc.noaa.gov)
University of Colorado, CIRES * Campus Box 449 * Boulder, CO 80309
phone: (303) 492-0707 fax: (303) 497-7013
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Line index
Next Topic: [Q]: How to calculate distance from GPS measurements

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

Current Time: Sun Oct 12 11:18:58 PDT 2025

Total time taken to generate the page: 2.08033 seconds