10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can i convert two columns in to o and 1 matrix. thnks
Input
a c1
b c2
c c1
d c3
e c4
output
c1 c2 c3 c4
a 1 0 0 0
b 0 1 0 0
c 1 0 0 0
d 0 0 ... (5 Replies)
Discussion started by: quincyjones
5 Replies
2. Shell Programming and Scripting
Hi all,
I have a large matrix of 720 x 25. I want to get sum of range of rows and columns. Like, I need sum of all columns and row number 2 to 21, then leaving 22nd row, again sum of all columns and row number 23 to 42 again leaving 43rd row and then sum of 44th to 63. Means I want to add all... (4 Replies)
Discussion started by: CAch
4 Replies
3. Shell Programming and Scripting
Hi, every one. I have two files ,one is in matrix like this, one is a list with the same data as the matrix.
AB AE AC AD AA AF
SA 3 4 5 6 4 6
SC 5 7 2 8 4 3
SD 4 6 5 3 8 3
SE 45 ... (5 Replies)
Discussion started by: xshang
5 Replies
4. Shell Programming and Scripting
Hi there,
If anyone can help me sorting out this small task would be great. Given a matrix like the following:
100 3 3 3 3 3 ...
200 5 5 5 5 5 ...
400 1 1 1 1 1 ...
500 8 8 8 8 8 ...
900 0 0 0 0... (5 Replies)
Discussion started by: JRodrigoF
5 Replies
5. Shell Programming and Scripting
Hi everyone
I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Discussion started by: stonemonkey
5 Replies
6. Shell Programming and Scripting
Howdy,
I need to convert an association data matrix, currently in a two-column format, into a matrix with numbers indicating the number of associations. I've been looking around for AWK code in the list, but could not find anything. Here's an example of what I want to perform:
original... (10 Replies)
Discussion started by: sramirez
10 Replies
7. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
8. Shell Programming and Scripting
hi there
I'm very new in programing and i've started with awk.
I'm processing 200 data files and I need to do some precessing on them.
The files have 3 columns with N-lines
for each line a have on the first and second value is the same for all the files and only the third is variable. like... (2 Replies)
Discussion started by: philstar
2 Replies
9. Shell Programming and Scripting
I need to inverse a matrix given in a file.
The problem is I'm stuck with writing determinant finding algoritm into code.
I found this algoritm about finding determinant of nxn matrix. This is what i need:
Matrices and Determinants
and here:
a11 a12 a13
a21 a22 a23
a31 a32 a33... (0 Replies)
Discussion started by: vesyyr
0 Replies
10. UNIX for Dummies Questions & Answers
I have few days to complete my awk homework. But I'm stucked. i hope some1 will help me out.
I have to inverse n x n matrix, but I have problems with finding the determinant of the matrix.
I found the algoritm, how to find a determinant of n x n matrix:... (0 Replies)
Discussion started by: vesyyr
0 Replies