简体   繁体   中英

Change the dimensionality of a 3-D data type in matlab

I have this data of type 3-D in matlab with the dimensions (100,100,100). I want to reshape this data such that I only want the data of dimension (100, 2:10,100). How can I do this in matlab?

If A is your 100x100x100 matrix, you can use:

    B = A(:,2:10,:);

B is then a 100x9x100 matrix consisting of A's data of the corresponding entries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM