How can I insert values from the vertical 3rd matrix dimension in between the rows of the vertical 1st and 2nd dimension?
Afficher commentaires plus anciens
For matrix 210x2x4 I want to generate a 840x2 matrix, where in this order:
[matrix(1,:,1);matrix(1,:,2);matrix(1,:,3);matrix(1,:,4);matrix(2,:,1);matrix(2,:,2);....]
I'm still not clear how to insert values between values in matrices, any suggestions?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 13 Juin 2011
0 votes
Use permute() and then reshape(). Looks to me like you would want to permute() with [1 3 2].
2 commentaires
Adam Quintero
le 13 Juin 2011
Walter Roberson
le 13 Juin 2011
reshape(permute(matrix,[1 3 2]),[],2)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!