For a given matrix Z and assuming the first column refers to index values, is it possible to find the mean of Z(:,2:3) based on the index values in the first column Z(:,1).
Z = [1 3 4
2 7 8
1 3 9
3 4 4
1 5 7]
So how can I loop over Z to find the mean of corresponding rows with index value 1 (in the first column) i.e finding the mean of Z1
Z1 = 3 4
3 9
5 7
Please can anyone help by explaining how to do this?