Hi there,
I have a matrix of numbers separated by a space in a text file that looks like this:
Code:
2 3 9 8 9 0
6 9 0 8 5
0 9 8 7
6 5 4
1 3
5
(FYI: I don't have a 6x6 matrix, as the example above, but 400x400)
Now I want to fill the total matrix with zero's in the lower triangle:
Code:
2 3 9 8 9 0
6 9 0 8 5 0
0 9 8 7 0 0
6 5 4 0 0 0
1 3 0 0 0 0
5 0 0 0 0 0
One more piece of info: I also have each column in it's own text file, for instance the second column:
If I could get a script to go into the file of that second column and change the 5 rows into 6 rows and placing a "0" in the empty row, this second file could change into this:
that would also be of great help.
Thanks for any help/tips.
Mike
(I'm comfortable with simple grep, sed, awk, and tr scripts but not a hard line programmer)