I have a big matrix and I'm looking for an easy way to group them by a certain way then find the maximum in each group. I have created this code but I got stuck. Anyway to help please. I need to know the indexes of all the maximum points to extract more information from the big matrix.
data = randn(10,1)*10;edges = 0:5:35';Y = discretize(data,edges);[B,I] = sort(Y);SortedMatrix = [B data(I)];
Best Answer