From: Sebastian on
Hi,

I have a multidimensional numerical Array A(38,11,188) that I would like to transfrom into a Matrix B(7144,11). Basically what I want to do is concatenate each "page" of the array into one big Matrix.

I saw in the help that for structural arrays one can do that easily, but I have no idea how to do it for numerical arrays.

Any help will be more than welcomed,

Sebastian
From: Matt Fig on
See the RESHAPE function.
From: Walter Roberson on
Sebastian wrote:

> I have a multidimensional numerical Array A(38,11,188) that I would like
> to transfrom into a Matrix B(7144,11). Basically what I want to do is
> concatenate each "page" of the array into one big Matrix.

reshape(permute(B,[1 3 2]),[],size(B,2))

But you will want to double-check that this gets the rows in the order
that you want.
From: Sebastian on
Walter Roberson <roberson(a)hushmail.com> wrote in message <hp0omv$jdj$1(a)canopus.cc.umanitoba.ca>...
> Sebastian wrote:
>
> > I have a multidimensional numerical Array A(38,11,188) that I would like
> > to transfrom into a Matrix B(7144,11). Basically what I want to do is
> > concatenate each "page" of the array into one big Matrix.
>
> reshape(permute(B,[1 3 2]),[],size(B,2))
>
> But you will want to double-check that this gets the rows in the order
> that you want.

Walter, thank you so much, it worked perfectly.