[Solved] Calculate the mean of set of rows in a matrix [duplicate]


Assuming original data is in matrix A:

indx=unique(A(:,1));
for ii=1:numel(indx)
  RowMean(ii,:)=mean(A(1,:)==indx(ii),:);
end

2

solved Calculate the mean of set of rows in a matrix [duplicate]