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

Home » Public Forums » archive » Re: How to append a multi dimensional array?
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: How to append a multi dimensional array? [message #74246] Wed, 05 January 2011 05:47 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Balt writes:

> a seemingly trivial problem and I can't get my head around it. Does
> anyone see the solution?
>
> Given:
> IDL> x = [1,2,3]
> IDL> y = [4,5,6]
> IDL> bigarray = [[x], [y]]
> IDL> help,bigarray
> BIGARRAY INT = Array[3, 2]
>
> Except, I can't do it like that, because I need to create BIGARRAY
> step by step, i.e. there are steps that require bigarray to already
> exist when y is calculated. And y then needs to be dynamically added
> to bigarray.
>
> How can I add a vector to an array generically?

You might want to have a look at the Dimensional Juggling
and Array Concatenation tutorials:

http://www.dfanning.com/tips/rebin_magic.html
http://www.dfanning.com/tips/array_concatenation.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: stl files
Next Topic: Re: stl files

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

Current Time: Wed Oct 08 15:21:47 PDT 2025

Total time taken to generate the page: 0.00420 seconds