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

Home » Public Forums » archive » Re: Array index for arrays
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: Array index for arrays [message #28417 is a reply to message #28335] Tue, 04 December 2001 18:40 Go to previous message
air_jlin is currently offline  air_jlin
Messages: 22
Registered: July 2001
Junior Member
Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote in message
news:<onr8qb6ok2.fsf@cow.physics.wisc.edu>...
> [...]
>
> Yes, this has burned me a couple of times. The short answer is that
> when you combine two or more "index lists", then they are treated as
> one-for-one coordinate lists. What you want can be achieved in two
> separate indexing steps:
>
but how come adding a third "*" dimension gives something you would
expect?

---------------------------------
IDL> z=indgen(3,2,4)
IDL> ix=[0,1]
IDL> print,z
0 1 2
3 4 5

6 7 8
9 10 11

12 13 14
15 16 17

18 19 20
21 22 23
IDL> print,z[ix,ix,*]
0 1
3 4

6 7
9 10

12 13
15 16

18 19
21 22
---------------------------------

thanks!

best,
-Johnny


-------------------------------------------
Johnny Lin
CIRES, University of Colorado
Work Phone: (303) 735-1636
Web: http://cires.colorado.edu/~johnny/
-------------------------------------------
[Message index]
 
Read Message
Read Message
Previous Topic: ION Script Windowing Issues
Next Topic: Re: set_plot,'PS'

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

Current Time: Wed Oct 08 14:58:26 PDT 2025

Total time taken to generate the page: 0.00453 seconds