Need help on the array of matrix.
Afficher commentaires plus anciens
I have a matrix A in a size of n x 1, where A = [a_11 ; a_21 ; a_31 ; ......... ; a_n1]
I want to separate the row of matrix A in every j rows. Let say j = 3, which mean I will obtain:
[a_11 a_21 a_31] ; [a_41 a_51 a_61] ; ..... ; [a_(n-2)11 a_(n-1)1 a_n1]. The total matrix I will obtain is eaual to n/3.
Then I want to group them as B =
[1 a_11 a_21 a_31 ;
2 a_41 a_51 a_61 ;
3 a_71 a_81 a_91 ;
.................................................. ;
n/3 a_(n-2)1 a_(n-1)1 a_n1]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Resizing and Reshaping 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!