问题描述:

I have a 3d mxnxt matrix , I want to be able to extract t 2d nxm matrices.

In my case I have a 1024x1024x10 matrix and I want to have 10 images showing it to me.

This is not reshaping, I want just part of the data each time, is there a way doing it simpler that just coping member by member the data needed?

网友答案:

Yes, just do e.g.:

my_2d_array = my_3d_array(:,:,n);

For more info, see e.g. http://www.mathworks.com/help/techdoc/math/f1-86528.html.

网友答案:

as Oliver said you can use:

my_2d_array = my_3d_array(:,:,n);

You can use squeeze function to remove the 1*1 of the matrix.

相关阅读:
Top