简体   繁体   English

在Matlab中更改3-D数据类型的维数

[英]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). 我在Matlab中具有尺寸为(100,100,100)的3-D类型的数据。 I want to reshape this data such that I only want the data of dimension (100, 2:10,100). 我想重塑该数据,以便只需要维度(100,2:10,100)的数据。 How can I do this in matlab? 如何在Matlab中做到这一点?

If A is your 100x100x100 matrix, you can use: 如果A是您的100x100x100矩阵,则可以使用:

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

B is then a 100x9x100 matrix consisting of A's data of the corresponding entries. 那么B是一个100x9x100的矩阵,由A的相应条目的数据组成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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