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 #28335] Tue, 04 December 2001 06:35 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
the_cacc@hotmail.com (trouble) writes:

> z=indgen(4,4)
> ix=[0,1]
> help,z[ix,ix]
>
> <Expression> INT = Array[2]
...
> Not what I expected !?!

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:

help, (z[ix,*])[*,iy]

Ie, first do the X index then the Y index.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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 10:56:56 PDT 2025

Total time taken to generate the page: 0.00425 seconds