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

Home » Public Forums » archive » Re: 9 dimensions 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: 9 dimensions arrays [message #41860] Mon, 06 December 2004 21:09 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.1c1eb6cc10c06fca98989b@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:

> Francois writes:
>
>> How to create nine dimensions (9D) arrays ?
>>
>> The command make_array takes only 8 dimensions...
>> It seems the same for intarr, fltarr, etc.
>
> That's right. Eight is the limit in IDL.

Well, you could make your own n-dimensional arrays by using
one-dimensional arrays and writing your own subscripting function, e.g.,

dims = [n1, n2, n3, n4, n5, n6, n7, n8, n9]
x = FLTARR(PRODUCT(dims))
x[MY_INDEX(i1, i2, i3, i4, i5, i6, i7, i8, i9, DIMS = dims)] = ...

The MY_INDEX function would convert from subscripts to 1-D array index
(what IDL does for normal subscripts internally).

Of course, it wouldn't be particularly fast. ;-)

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Broker
Next Topic: Re: IDL Broker

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

Current Time: Thu Oct 09 11:45:02 PDT 2025

Total time taken to generate the page: 2.15665 seconds