Effacer les filtres
Effacer les filtres

How to create a 3 dimensional matrix from two matrices each of 2 dimensions

1 vue (au cours des 30 derniers jours)
DM
DM le 3 Fév 2017
I have two matrices A and B each of dimension 4x110. I would like to create a 3 dimensional matrix C of dimension 4x2x110 which is filled by values from A and B. The second dimension is because we have two matrices A and B.

Réponses (1)

James Tursa
James Tursa le 3 Fév 2017
C = reshape([A;B],size(A,1),2,size(A,2));

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by