I would like to merge multiple files with the same row and column size into a matrix format
In a folder I have multiple files in the following format
Like this 1000's of files
Notice that all files have the same first column.
I want to merge all the files into a single file with the following format
Where a top row is also added which is the first part (number before.txt) of the files name
Is it a good way to do it using awk or sed.
LA
---------- Post updated at 03:23 PM ---------- Previous update was at 12:54 PM ----------
Please let me know to do such large merging in an effective way either used awk or sed
Hi all,
Is there a way to convert full data matrix to linearised left data matrix?
e.g full data matrix
Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7
Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245
Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
I have the code below in C++ and am trying to understand what these do and how to call them.
template <class Type>
class Matrix {
public:
Matrix();
Matrix(
const int m,
const int n );
Matrix(
const Matrix& A );
~Matrix(); (0 Replies)
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)
Hi,
I have a table in the format:
1 0 -1 1 0
2 0 1 -1 0 0 0
3 0 1 1 0 0 0 0 0 0
etc.
I am trying to input this to a program, however it is complaining about the fact that it is not in matrix format. How do I add 0's to end of the rows to make them even?
Thanks in advance! (2 Replies)
Hello All,
I need your help in the following problem. I have a matrix of 500 columns and 1000 rows and in each cell, it is having a value range from 0 to 9. I would like to convert each column in to a matrix, according to the value in each cell (ie) 0 to 9.
For each column, I need a matrix... (5 Replies)
Hello friends,
A big question for the UNIX INTELLIGENCE
I have a CSV file as follows:
VALUE,USER1,relatedUSER1,relatedUSER2
-1,userA,userB,userC
1,userN,userD,userB
0,userF,userH,userG
0,userT,userH,userB
1,userN,userB,userA
-1,userA,userF,userC
0,userF,userH,userG... (15 Replies)
I want to go from
1,a,1a
1,b,1b
1,c,1c
2,a,2a
2,b,2b
3,a,3a
to
a,b,c
1,1a,1b,1c
2,2a,2b,-
3,3a,-,-
Here is what I tried
awk -F, 'BEGIN {OFS = ","} (4 Replies)
Discussion started by: senhia83
4 Replies
LEARN ABOUT REDHAT
cgeequ
CGEEQU(l) ) CGEEQU(l)
NAME
CGEEQU - compute row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number
SYNOPSIS
SUBROUTINE CGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFO )
INTEGER INFO, LDA, M, N
REAL AMAX, COLCND, ROWCND
REAL C( * ), R( * )
COMPLEX A( LDA, * )
PURPOSE
CGEEQU computes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number. R returns the row scale
factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements
B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
R(i) and C(j) are restricted to be between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is
not guaranteed to reduce the condition number of A but works well in practice.
ARGUMENTS
M (input) INTEGER
The number of rows of the matrix A. M >= 0.
N (input) INTEGER
The number of columns of the matrix A. N >= 0.
A (input) COMPLEX array, dimension (LDA,N)
The M-by-N matrix whose equilibration factors are to be computed.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,M).
R (output) REAL array, dimension (M)
If INFO = 0 or INFO > M, R contains the row scale factors for A.
C (output) REAL array, dimension (N)
If INFO = 0, C contains the column scale factors for A.
ROWCND (output) REAL
If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). If ROWCND >= 0.1 and AMAX is neither
too large nor too small, it is not worth scaling by R.
COLCND (output) REAL
If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C.
AMAX (output) REAL
Absolute value of largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be
scaled.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, and i is
<= M: the i-th row of A is exactly zero
> M: the (i-M)-th column of A is exactly zero
LAPACK version 3.0 15 June 2000 CGEEQU(l)