Home > Archive > Matlab > January 2008 > Concaneating 3Dmatrices
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Concaneating 3Dmatrices
|
|
| Heena D 2008-01-23, 7:54 pm |
| Hello,
I have this covariance matrix
r =
dates: [1x446 double]
header: {1x128 cell}
data: [128x128x446 double]
and
m =
dates: [1x446 double]
header: {1x128 cell}
data: [128x128x446 double]
If I want to obtain a concantenated matrix of r and m above
header: {1x256cell}
dates: [1x446 double]
data: [256x256x446 double]
How do I do this.
Thanks for your help!
| |
| Walter Roberson 2008-01-23, 7:54 pm |
| In article <fn7ljs$91r$1@fred.mathworks.com>,
Heena D <heenagd@gmail.com> wrote:
>I have this covariance matrix
>r =
> dates: [1x446 double]
> header: {1x128 cell}
> data: [128x128x446 double]
>and
>m =
> dates: [1x446 double]
> header: {1x128 cell}
> data: [128x128x446 double]
>If I want to obtain a concantenated matrix of r and m above
>header: {1x256cell}
> dates: [1x446 double]
> data: [256x256x446 double]
>How do I do this.
You can use result.header = [r.header, m.header]
to get your 1 x 256 cell for the header.
You can pick either r.dates or m.dates as your result.dates .
But for your result.data you want 256 x 256 x 446 while the
total amount of data available between r.data and m.data
is only 2 * (128 x 128 x 446), e.g., 256 x 128 x 446, only
half the required size. And simply replicating covariance matrices
doesn't work very well.
--
"I was very young in those days, but I was also rather dim."
-- Christopher Priest
| |
| Heena D 2008-01-23, 7:54 pm |
| roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <fn7mqp$jka$1@canopus.cc.umanitoba.ca>...
> In article <fn7ljs$91r$1@fred.mathworks.com>,
> Heena D <heenagd@gmail.com> wrote:
>
>
>
>
>
above[color=darkred]
>
>
>
> You can use result.header = [r.header, m.header]
> to get your 1 x 256 cell for the header.
>
> You can pick either r.dates or m.dates as your
result.dates .
>
> But for your result.data you want 256 x 256 x 446 while
the
> total amount of data available between r.data and m.data
> is only 2 * (128 x 128 x 446), e.g., 256 x 128 x 446,
only
> half the required size. And simply replicating
covariance matrices
> doesn't work very well.
>
> --
> "I was very young in those days, but I was also
rather dim."
> -- Christopher Priest
Thanks a lot,
My major problem is that when i try to load my covariance
matrix I get a Memory error, Im quite on how to
deal with it. Which is why I thought I would resort to
dividing the matrix.
But I guess that doesnt work either! :(
|
|
|
|
|