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

Home » Public Forums » archive » Problem array subscripting
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: Problem array subscripting [message #16791 is a reply to message #16681] Tue, 17 August 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Henry Chapman (chapman9@llnl.gov) writes:

> This can be solved with a little trick I posted awhile back (some time
> after a long thread about indices). The trick is to index an extra
> dimension.
>
> Example:
>
> IDL> array = bindgen(16,16,5)
> IDL> index = indgen(5)
> IDL> x = [0,1,2]
> IDL> y = [8,9,10,11]
>
> IDL> result = array[x, y, index, 0]

The trouble with this trick is that I don't understand
how it works. It's fine for production code, don't get
me wrong, where a little smoke and mirrors can even be
elegant. I just don't want to get up in front of an IDL
programming class and have to explain it. Do you have
any theories?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Xwindow, TVimage and PostScript fonts
Next Topic: Re: bounds check in array subscripts

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

Current Time: Fri Oct 10 06:56:10 PDT 2025

Total time taken to generate the page: 2.24049 seconds