You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often when I sort data, what I really want are the N largest values. I think a function
function maxloc_n(x,n) result(imax)
real, intent(in) :: x(:)
integer, intent(in) :: n
integer :: imax(n) ! positions of n largest values of x(:)
end function maxloc_n