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

Home » Public Forums » archive » adding a 4th dimension to 3D array during concatenation
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: adding a 4th dimension to 3D array during concatenation [message #92879 is a reply to message #92869] Wed, 16 March 2016 22:52 Go to previous message
Guilherme Gualda is currently offline  Guilherme Gualda
Messages: 2
Registered: March 2016
Junior Member
Hi,

It may not be the most efficient, but it is easy to do what you want if you use reform. In your example, if each array x you create has dimensions [sx, sy, sz], then you can use:

array = [array, reform(x, 1, sx, sy, sz)]

Hope this helps!

Best,

Guil



On Tuesday, March 15, 2016 at 5:37:18 PM UTC-5, Wayana Dolan wrote:
> So outside a loop I start out with an empty array (ex. array=[ ] ). Then each time through the loop, I make an array with 3 dimensions (for example, array x has dimensions[91, 41, 33] ), and then concatinate it to the previous array. (ex. array=[array, x]).
>
> Lets say we run through the loop 16 times. What I'd like as a result is something that has dimensions like this [16, 91, 41, 33].
>
> I'm not sure how to do this... I've looked at IDL coyote's concatenation tutorial, and still am having trouble.
>
> I'm pretty new to coding period, so this is a challenge. Any ideas?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: n Number of output files
Next Topic: Filtering based on Hessian Matrix

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

Current Time: Sun Nov 30 17:45:29 PST 2025

Total time taken to generate the page: 2.64480 seconds