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

Home » Public Forums » archive » Re: concatenating beyond [[[]]]
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: concatenating beyond [[[]]] [message #32656 is a reply to message #32653] Wed, 23 October 2002 14:33 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
mperrin+news@arkham.berkeley.edu (Marshall Perrin) writes:

> How best to venture into the land where square brackets fail?
> I want to concatenate some 3D data cubes into a 4D dataset.
> (Basically this is a cube of images produced as I vary two
> parameters in a simulation). Square brackets don't work.
> Is there any more elegant or faster solution than just a
> for loop wrapped around
> bigarr[*,*,i,j] = littlearr[*,*]
> ?
>
> In particular it would be nice to be able to append an entire
> 3D 'slice' to my 4D data cube without having to re-allocate
> a new larger array and copy everything over, but that's probably
> not easy to do, is it?

Yes, it would be nicer and more elegant, but it won't be faster. If
in your FOR loop you fill 2D slices all at once, then the overhead of
a FOR loop will be negligible.

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: Image fusion algorithm...
Next Topic: IDLWAVE 4.16 -- idlwave.org

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

Current Time: Mon Oct 13 07:05:07 PDT 2025

Total time taken to generate the page: 1.76210 seconds