Hi everyone
I want to aggregate every Nth row of my X by Y matrix, such that the matrix transforms into a N by Y matrix
Example: aggregate every 3rd row of a 6 by 3 matrix A, transforming A into a 3 by 3 matrix B.
A=1 6 88 6 4 2 5 126 8 714 8 67 21 5B=7 14 1522 14 109 26 17
I have a 2464×44 matrix (F), of which I want to aggregate every 56th row, such that the matrix transforms into a 56×44 matrix. I know I can find the sum of every 56th element through the command: sum(F(1:56:end,:)1);
I just don't know how do this for each row and how to create the matrix that I need.
Thanks a lot in advance!!
Best Answer