Hi All
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
vi 12.txt
a 1
b 5
c 7
d 0
vi 45.txt
a 3
b 6
c 9
d 2
vi 9.txt
a 4 (7 Replies)
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)
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 am quite new in this but I need some help to keep going with my analysis.
I am struggling with a short script to read a square matrix and convert it in two collumns.
A B C D
A 0.00 0.06 0.51 0.03
B 0.06 0.00 0.72 0.48
C 0.51 0.72 0.00 ... (7 Replies)
Hi Experts,
I want to print this charts diagonal data into straight lines.
This is a matrix 24X24 Horizontal and vertical.
- I want to print all the diagonal cutting characters into straight line:
Data:
E F S S A H A L L A T M C N O T S O B O D U Q H
I W I B N L O C N I L N L A N S I N... (9 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 have two files. Row id in File1 matches the column id in file2 (starting from column7 )except the last 2 characters. File1 has 50 rows and File 2 has 56 columns. If the id matches I want to multiply the value in column3 of File1 to the entire column in File2. and in the final output print only... (11 Replies)
Discussion started by: Akang
11 Replies
LEARN ABOUT REDHAT
slagtf
SLAGTF(l) ) SLAGTF(l)
NAME
SLAGTF - factorize the matrix (T - lambda*I), where T is an n by n tridiagonal matrix and lambda is a scalar, as T - lambda*I = PLU,
SYNOPSIS
SUBROUTINE SLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
INTEGER INFO, N
REAL LAMBDA, TOL
INTEGER IN( * )
REAL A( * ), B( * ), C( * ), D( * )
PURPOSE
SLAGTF factorizes the matrix (T - lambda*I), where T is an n by n tridiagonal matrix and lambda is a scalar, as T - lambda*I = PLU, where P
is a permutation matrix, L is a unit lower tridiagonal matrix with at most one non-zero sub-diagonal elements per column and U is an upper
triangular matrix with at most two non-zero super-diagonal elements per column.
The factorization is obtained by Gaussian elimination with partial pivoting and implicit row scaling.
The parameter LAMBDA is included in the routine so that SLAGTF may be used, in conjunction with SLAGTS, to obtain eigenvectors of T by
inverse iteration.
ARGUMENTS
N (input) INTEGER
The order of the matrix T.
A (input/output) REAL array, dimension (N)
On entry, A must contain the diagonal elements of T.
On exit, A is overwritten by the n diagonal elements of the upper triangular matrix U of the factorization of T.
LAMBDA (input) REAL
On entry, the scalar lambda.
B (input/output) REAL array, dimension (N-1)
On entry, B must contain the (n-1) super-diagonal elements of T.
On exit, B is overwritten by the (n-1) super-diagonal elements of the matrix U of the factorization of T.
C (input/output) REAL array, dimension (N-1)
On entry, C must contain the (n-1) sub-diagonal elements of T.
On exit, C is overwritten by the (n-1) sub-diagonal elements of the matrix L of the factorization of T.
TOL (input) REAL
On entry, a relative tolerance used to indicate whether or not the matrix (T - lambda*I) is nearly singular. TOL should normally be
chose as approximately the largest relative error in the elements of T. For example, if the elements of T are correct to about 4
significant figures, then TOL should be set to about 5*10**(-4). If TOL is supplied as less than eps, where eps is the relative
machine precision, then the value eps is used in place of TOL.
D (output) REAL array, dimension (N-2)
On exit, D is overwritten by the (n-2) second super-diagonal elements of the matrix U of the factorization of T.
IN (output) INTEGER array, dimension (N)
On exit, IN contains details of the permutation matrix P. If an interchange occurred at the kth step of the elimination, then IN(k)
= 1, otherwise IN(k) = 0. The element IN(n) returns the smallest positive integer j such that
abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL,
where norm( A(j) ) denotes the sum of the absolute values of the jth row of the matrix A. If no such j exists then IN(n) is
returned as zero. If IN(n) is returned as positive, then a diagonal element of U is small, indicating that (T - lambda*I) is singu-
lar or nearly singular,
INFO (output) INTEGER
= 0 : successful exit
LAPACK version 3.0 15 June 2000 SLAGTF(l)