Hi, is it possible find the maximum depth in $2 for every different value in $1(a coordinate)?. The depth in the file ranges to a maximum of around -14 and always starts at -1.47. $4 is "actual" depth
486 -1.47 1.83712 -3.35
486 -1.97 1.67761 -3.35
486 -2.47 1.4363 -3.35
486 -2.97 2.89847 -3.35
487 -1.47 1.81872 -3.43
487 -1.97 1.66125 -3.43
488 -1.47 1.41585 -3.36
so just to clarify
###################################################
while $1 == 486; conc=2.89847 (the corresponding value in $3 at the maximum value of $2 (-2.97), and actual=$4 of the same line (-3.35).
awk "other awk program requiring $conc and $actual"
loop back and repeat for the next coordinate in $1 (487)
conc=1.66125
actual=-3.43
continue to the end of file
###################################################
i hope this makes sense and that someone can help
486 -1.47 1.83712 -3.35
486 -1.97 1.67761 -3.35
486 -2.47 1.4363 -3.35
486 -2.97 2.89847 -3.35
487 -1.47 1.81872 -3.43
487 -1.97 1.66125 -3.43
488 -1.47 1.41585 -3.36
so just to clarify
###################################################
while $1 == 486; conc=2.89847 (the corresponding value in $3 at the maximum value of $2 (-2.97), and actual=$4 of the same line (-3.35).
awk "other awk program requiring $conc and $actual"
loop back and repeat for the next coordinate in $1 (487)
conc=1.66125
actual=-3.43
continue to the end of file
###################################################
i hope this makes sense and that someone can help