Suppose that matrix A have new value in each iteration (updatable), Is there anyway to save the rowsOfMaxes matrix A in each iteration? I tried to use [rowsOfMaxes(i) colsOfMaxes(i)], but it doesn't work.
A = [6;7;21;4;9;21;5;1];max(A(:))[maxValue, linearIndexesOfMaxes] = max(A(:));[rowsOfMaxes colsOfMaxes] = find(A == maxValue,1,'first')
Can anyone please help me?
Best Answer