subroutine maxu(ray,num,peak) implicit none integer num,peak,i real ray(num),test test=ray(1) peak=1 do i=2,num if (abs(test).lt.abs(ray(i))) then test=ray(i) peak=i endif end do return end