How do I convert a 2d matrix to a 3d matrix?

3 次查看(过去 30 天)
I have 5 matrix 2D.
However, how do I convert 5 2D matrices to 3D?
which generates a matrix to 24x24x5

回答(1 个)

Geoff Hayes
Geoff Hayes 2022-6-6
@Mirza Etnisa - consider using cat to concatente your matrices along the third dimension:
result = cat(3, Ekc1, Ekc2, Ekc3, Ekc4, Ekc5);
Alternatively, rather then generating five equally sized matrices/variables,you could just insert them into a 24x24x5 array as each one is constructed...and then you would do away with these extra variables.

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by