I have a script where I take the maximum values out of a matrix for each column. I am using the index of the max value to get that one.
Sometimes indexmax is more then 1 value. That is the moment that i only need the highes value of A(:,e)
Now I want to avoid that i am using 2 times the same index. I want to use that index just once for the highes match.
for e = 1:length(RawDatafile)
for f = 1:length(CLfile)
for g = 1:IndRD
percentage = (100/length2)*length3;
A(f,e) = percentage;
indexmax = find(A(:,e)==max(A(:,e)));
I tried the indexmax(1) but on that way its using just the first index and not the one he didn't use before.