From: John Seubert on
Fairly new to Matlab but I am taking an image file that has three dimensions(x,y,z) and I have to create a new matrix that has information from each z section. Problem is that the x and y values in this new data set can be different depending on their z value.

For example: in z=1, the x by y matrix may be 1x64 in size while for z = 2 it might be of size 3 x 55.

cat function does not work nor does simply trying to assign the values.

Any hints? Thanks
From: Walter Roberson on
John Seubert wrote:
> Fairly new to Matlab but I am taking an image file that has three
> dimensions(x,y,z) and I have to create a new matrix that has information
> from each z section. Problem is that the x and y values in this new data
> set can be different depending on their z value.
> For example: in z=1, the x by y matrix may be 1x64 in size while for z =
> 2 it might be of size 3 x 55.
> cat function does not work nor does simply trying to assign the values.
> Any hints? Thanks

I suggest you research cell arrays. Start with the documentation for the
cell() call, but you will want to go into the "getting started" documentation
for good information on how to make use of cells.
From: John Seubert on
I did a little reading up on cell matrices and that seemed to be what I needed.