Search Results

Search: Posts Made By: Chubler_XL
4,621
Posted By Chubler_XL
OK now I see how is should work, try this: ...
OK now I see how is should work, try this:

awk '
{ P[$1]=$2 ; m=m?m:$1; n=$1>n?$1:n; x[NR]=$1 ; y[NR]=$2 }
END {
x[0]=y[0]=0
p=-2
for(i=m;i<=n;i++) {
if (i in P) { p++;...
4,621
Posted By Chubler_XL
Damn, Here is a debug version that show the...
Damn,

Here is a debug version that show the formula with expanded values, it might help us find the issue.

Note data file should not contain the heading (#X Y) line:

awk '
{ P[$1]=$2 ;...
4,621
Posted By Chubler_XL
How about this: awk ' { P[$1]=$2 ;...
How about this:

awk '
{ P[$1]=$2 ; m=$1>m?$1:m; x[NR]=$1 ; y[NR]=$2 }
END {
for(i=1;i<=m;i++) {
if (i in P) printf "%0.4f %0.4f\n", i, P[i];
else printf "%0.4f %0.4f\n", i,...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy