Need help on the array of matrix.
Show older comments
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]
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!