annotate tools/rdock/data/pmf/smoothed/pmf2m.awk @ 2:0faa03a92843 draft default tip

Uploaded
author dzesikah
date Fri, 26 Aug 2016 10:19:49 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
1 #!/bin/awk -f
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
2 {
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
3 a[NR]=$1;
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
4 b[NR]=$2;
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
5 }END{
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
6 print "# name: x"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
7 print "# type: matrix"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
8 print "# rows: 1"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
9 print "# columns: "NR
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
10 for(i=1;i<=NR;i++)
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
11 printf("%f ",a[i]);
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
12 print ""
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
13 print "# name: y"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
14 print "# type: matrix"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
15 print "# rows: 1"
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
16 print "# columns: "NR
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
17 for(i=1;i<=NR;i++)
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
18 printf("%f ",b[i]);
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
19 print " ";
0faa03a92843 Uploaded
dzesikah
parents:
diff changeset
20 }