ellipm
Programmer
- Apr 19, 2012
- 7
Hello again,
I was wondering if sb knows how can i calculate the max value of an array. This is what I mean:
I have calculated some values for my array "YUHALF" and I want the first of them,which happens to be the max value. Because of the if-statement, I don't know in which j it happens in every step.
Any advice is much appreciated!thanks
I was wondering if sb knows how can i calculate the max value of an array. This is what I mean:
Code:
IF(U(I+1,J).LE.UMEAN(I+1)) then
YUHALF(I+1)=(J-2)*DY+((Y(J)-Y(J-1))/(U(I+1,J)-U(I+1,J-1)))*(UMEAN(I+1)-U(I+1,J-1))
write(*,*) 'i=',i+1,'j=',j,'yuhalf=',yuhalf(I+1)
end if
I have calculated some values for my array "YUHALF" and I want the first of them,which happens to be the max value. Because of the if-statement, I don't know in which j it happens in every step.
Any advice is much appreciated!thanks