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

Home » Public Forums » archive » Re: Array indexing: what is IDL doing?
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 indexing: what is IDL doing? [message #60706 is a reply to message #60704] Mon, 09 June 2008 08:34 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Fri, 6 Jun 2008 09:50:33 -0700 (PDT), Conor wrote:

> So I want to pull out a small subsection from within a larger idl
> array. I want to do something like this:
>
> bigarr = findgen(500,100000)
> bigx = [indgen(50)+100,indgen(25)+200]
> bigy = indgen(10000)+50000
>
> res = bigarr[bigx,bigy]
>
> However IDL doesn't like that and says:
>
> % All array subscripts must be same size. Var = BIGARR
> % Execution halted at: $MAIN$
>
You may want to try this command:
res = bigarr[bigx,bigy,0]

IDL accepts arrays of different size as subscripts, if at least one of
the subsripts is a scalar. Here the "0" addresses an "extra"
dimension. Since this extra dimension is of size 1, it is degenerated
in the result. Array res has two dimensions, 75x10000.

Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how get value from combobox
Next Topic: Workbench problem following update

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

Current Time: Fri Oct 10 00:49:19 PDT 2025

Total time taken to generate the page: 0.95873 seconds