This is my problem:
I have a matrix, let's say A(900,9). It stores measurement of 30 seconds worth of data for 30 repeatitions. So, row 1 of matrix A is comparable to row 31, row 2 is comparable to row 32, etc.
Now, I need to match up these rows and calculate their average value.
Let's assume that I have vroken doen matrix A in 30 matrices, each of size (30,9). For example,
A1=zeros(30,9,30);
A1(:,:,1)=A(1:30,:);
A1(:,:,2)=A(31:60,:);
A1(:,:,3)=A(61:90,:);
A1(:,:,4)=A(91:120,:);
A1(:,:,5)=A(121:150,:);
A1(:,:,6)=A(151:180,:);
A1(:,:,7)=A(181:210,:);
A1(:,:,8)=A(211:240,:);
A1(:,:,9)=A(241:270,:);
A1(:,:,10)=A(271:300,:);
A1(:,:,11)=A(301:330,:);
A1(:,:,12)=A(331:360,:);
A1(:,:,13)=A(361:390,:);
A1(:,:,14)=A(391:420,:);
A1(:,:,15)=A(421:450,:);
A1(:,:,16)=A(451:480,:);
A1(:,:,17)=A(481:510,:);
A1(:,:,18)=A(511:540,:);
A1(:,:,19)=A(541:570,:);
A1(:,:,20)=A(571:600,:);
A1(:,:,21)=A(601:630,:);
A1(:,:,22)=A(631:660,:);
A1(:,:,23)=A(661:690,:);
A1(:,:,24)=A(691:720,:);
A1(:,:,25)=A(721:750,:);
A1(:,:,26)=A(751:780,:);
A1(:,:,27)=A(781:810,:);
A1(:,:,28)=A(811:840,:);
A1(:,:,29)=A(841:870,:);
A1(:,:,30)=A(871:900,:);
Now, finally I need to create a matrix, lets say B (30,9) that has the average of the rows of A1 matrices in rows.
I need some help write the code that creates matrix B from matrix A.