I am using the follwing code to find the maximum, but how do I find the 'n'th maximum?
ff =f(n+1, :, :, :); [MAX,I] = max(ff(:));dims = size(ff);fmax = cell(size(dims));[fmax{:}] = ind2sub(dims,I);
arrayindexingmaximum
ff =f(n+1, :, :, :); [MAX,I] = max(ff(:));dims = size(ff);fmax = cell(size(dims));[fmax{:}] = ind2sub(dims,I);
Best Answer