Hello,
I am trying to rewrite a text files in a certain format:
where the files look like:
"Row","Column","Values"
1,86,0.002
1,87,0.01
1,88,1.01
2,86,0.2
2,87,0.4
2,88,1.0
3,86,0.3
3,87,0.2
3,88,5.0
4,86,6.2
4,87,0.3
4,88,0.2
I want to now write the file based on the row number as, only the "values"
field will be displaced, and would look like a matrix, eg., shown below:
0.002 0.01 1.01
0.2 0.4 1.0
0.3 0.2 5.0
6.2 0.3 0.2
I now have multiple of similar files, which need to be converted to a matrix
format. I have the file names in a sequence format, such as
f1.dat, f2.dat, f3.dat, etc.
Could someone please help me to write the files in a matrix format and also
help to automate, so that all the other files are written similarly,
instead of running awk everytime for each file.
Thanks for any help.
I am trying to rewrite a text files in a certain format:
where the files look like:
"Row","Column","Values"
1,86,0.002
1,87,0.01
1,88,1.01
2,86,0.2
2,87,0.4
2,88,1.0
3,86,0.3
3,87,0.2
3,88,5.0
4,86,6.2
4,87,0.3
4,88,0.2
I want to now write the file based on the row number as, only the "values"
field will be displaced, and would look like a matrix, eg., shown below:
0.002 0.01 1.01
0.2 0.4 1.0
0.3 0.2 5.0
6.2 0.3 0.2
I now have multiple of similar files, which need to be converted to a matrix
format. I have the file names in a sequence format, such as
f1.dat, f2.dat, f3.dat, etc.
Could someone please help me to write the files in a matrix format and also
help to automate, so that all the other files are written similarly,
instead of running awk everytime for each file.
Thanks for any help.