How to reshape a matrix?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Badavath Purnesh Singh
le 10 Nov 2021
Commenté : Walter Roberson
le 11 Nov 2021
I have a matrix of size 9*10. I want each row of the matrix get converted into a 2D matrix, like 3*3 and the coloumns which represent the number of observations, which are 10. At the end I want a 3D matrix, comprising 3*3 matrix, which will represent my data points for a particilar observation and the other dimention in coloumns should be of 10, representing the number of obsverations.
0 commentaires
Réponse acceptée
Walter Roberson
le 10 Nov 2021
Array3D = reshape(Array2D, 3, 3, []);
5 commentaires
Walter Roberson
le 11 Nov 2021
Array3D = permute(reshape(Array2D, [], 3, 3), [3 2 1]);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!