Filter löschen
Filter löschen

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

4 Ansichten (letzte 30 Tage)
Mirza Etnisa
Mirza Etnisa am 6 Jun. 2022
Beantwortet: Geoff Hayes am 6 Jun. 2022
I have 5 matrix 2D.
However, how do I convert 5 2D matrices to 3D?
which generates a matrix to 24x24x5

Antworten (1)

Geoff Hayes
Geoff Hayes am 6 Jun. 2022
@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.


Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by