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

Home » Public Forums » archive » Re: How to extract a datarange from a multidimensional array?
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: How to extract a datarange from a multidimensional array? [message #42359 is a reply to message #42358] Fri, 28 January 2005 02:33 Go to previous message
David Lopez Pons is currently offline  David Lopez Pons
Messages: 8
Registered: July 2003
Junior Member
aeon@gmx.de wrote:

> Hi,
>
> i have following example data:
> x = [0,5,2,6,5,3,9]
> y = [1,5,7,4,3,4,8]
>
> to get the (x,y)-pairs in a special range i used the following:
> points = WHERE((x LE (5))AND(x GE (2))AND(y LE (7))AND(y GE (3)),count)
>
> Because i accept now the fact, that IDL works faster with array
> operations instead of for-loops ;)
> i want to do the following:
> xy=[[0,5,2,6,5,3,9],[1,5,7,4,3,4,8]]
>
> points=???
>
> i tried
> points= WHERE ((xy LE[5,7])AND(xy GE[2,3]),count)
> but this dont works for me.
>
> I know the solution is for sure simple one, but i cant find it.
> THX for every idea.
>
>
>
May be this is enough for you:

IDL> xy=[[0,5,2,6,5,3,9],[1,5,7,4,3,4,8]]
IDL> points2 = WHERE((xy[*,0] LE (5))AND(xy[*,0] GE (2))AND(xy[*,1] LE
(7))AND(xy[*,1] GE (3)),count)
IDL> print,points2
1 2 4 5

I supose that you want yhe same results for points and points2 :)...

Bye.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How to add each member of a pointarray to each member of another pointarray with arrayoperations?
Next Topic: Re: IDL 6.1.1 : how to activate opengl in hardware ?

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

Current Time: Sat Oct 11 13:17:08 PDT 2025

Total time taken to generate the page: 1.20098 seconds