I really do not know Linux and I really would like to understand it because it does help to work with large data. I am reading this forum for 1 week to try a solution for my problem. I think that, using others post informations, I was almost there...
I have 2 big tables like this
And I would like a final FILE 3 as
I tried using this code:
But the results for that exemple is:
ABC 011 012 --> OK
DEF 021 0 --> ok
XYZ 042 --> X : when the FILE 1 do not have the word at FILE 2, it do not put 0 and atthe other column the number.
This is the fist double. The second is how can I write the nameof which file at the top of the column?
Thank you all very much!
Best Regards, Leandro
Last edited by Scott; 08-06-2010 at 04:51 PM..
Reason: Please use code tags
Hi,Iam new to Unix.I have a file FileA which is a variable length file where each column is seperated by delimitter "|".
FileA:
SrNo Name Address
1-234|name1|Addr1
1-34|name2|Addr2
1-2345|name3|Addr3
FileB:
SrNo Address
1-34<<06 SPACES>>Addr1<<8 spaces>>
1-234<<05... (1 Reply)
I had two files file1 and file2. I want a o/p file(file3) like below using first column as ref. Pls give suggestion ass join is not working as the number of lines in each file is nealry 5 C?
file1
---------------------
404000324810001 Y
404000324810004 N
404000324810008 Y
404000324810009 N... (1 Reply)
I had two files 1.txt 2.txt. I want a 3rd file(o/p) 3.txt like below based on the common elements from the first coulmns of 1.txt and 2.txt.
1.txt
11
12
13
14
15
16
17
18
19
20
21
2.txt (6 Replies)
I have the following space-delimited input:
1 11.785710 117.857100
1 15 150
1 20 200
1 25 250
3 2.142855 21.428550
3 25 250
22 1.071435 10.714350
The first field is the ID number, the second field is the percentage of the total points that the person has and the third column is the number... (3 Replies)
Hello,
I have a tab-delimited table that may contain 11,12 or 13 columns. Depending on the number of columns, I want to cut and get a sub table as shown below. However, the awk commands in the code seem to be an issue. What should I be doing differently?
#cut columns 1-2,4-5,11 when 12 &... (3 Replies)
Hi all,
I know how to merge two tables and to remove the duplicated lines based on a field (Column 2) . My next challenge is to be able to identify in a new column those common elements between table A & B, those elements in table A not present in table B and vice versa. A simple count would be... (6 Replies)
I would like to merge two tables based on column 1:
File 1:
1 today
1 green
2 tomorrow
3 red
File 2:
1 a lot
1 sometimes
2 at work
2 at home
2 sometimes
3 new
4 a lot
5 sometimes
6 at work (4 Replies)
Hi,
Please excuse me , i have searched unix forum, i am unable to find what i expect ,
my query is , i have 2 files of same structure and having 1 similar field/column , i need to merge 2 tables/files based on the one matched field/column (that is field 1),
file 1:... (5 Replies)
Hellow,
I have a tab-delimited file with 3 columns :
BINPACKER.13259.1.p2 SSF48239
BINPACKER.13259.1.p2 PF13243
BINPACKER.13259.1.p2 G3DSA:1.50.10.20
BINPACKER.13259.2.p2 SSF48239
BINPACKER.13259.2.p2 PF13243
BINPACKER.13259.2.p2 G3DSA:1.50.10.20... (7 Replies)
Discussion started by: anjaliANJALI
7 Replies
LEARN ABOUT DEBIAN
cgels.f
cgels.f(3) LAPACK cgels.f(3)NAME
cgels.f -
SYNOPSIS
Functions/Subroutines
subroutine cgels (TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, INFO)
CGELS solves overdetermined or underdetermined systems for GE matrices
Function/Subroutine Documentation
subroutine cgels (characterTRANS, integerM, integerN, integerNRHS, complex, dimension( lda, * )A, integerLDA, complex, dimension( ldb, * )B,
integerLDB, complex, dimension( * )WORK, integerLWORK, integerINFO)
CGELS solves overdetermined or underdetermined systems for GE matrices
Purpose:
CGELS solves overdetermined or underdetermined complex linear systems
involving an M-by-N matrix A, or its conjugate-transpose, using a QR
or LQ factorization of A. It is assumed that A has full rank.
The following options are provided:
1. If TRANS = 'N' and m >= n: find the least squares solution of
an overdetermined system, i.e., solve the least squares problem
minimize || B - A*X ||.
2. If TRANS = 'N' and m < n: find the minimum norm solution of
an underdetermined system A * X = B.
3. If TRANS = 'C' and m >= n: find the minimum norm solution of
an undetermined system A**H * X = B.
4. If TRANS = 'C' and m < n: find the least squares solution of
an overdetermined system, i.e., solve the least squares problem
minimize || B - A**H * X ||.
Several right hand side vectors b and solution vectors x can be
handled in a single call; they are stored as the columns of the
M-by-NRHS right hand side matrix B and the N-by-NRHS solution
matrix X.
Parameters:
TRANS
TRANS is CHARACTER*1
= 'N': the linear system involves A;
= 'C': the linear system involves A**H.
M
M is INTEGER
The number of rows of the matrix A. M >= 0.
N
N is INTEGER
The number of columns of the matrix A. N >= 0.
NRHS
NRHS is INTEGER
The number of right hand sides, i.e., the number of
columns of the matrices B and X. NRHS >= 0.
A
A is COMPLEX array, dimension (LDA,N)
On entry, the M-by-N matrix A.
if M >= N, A is overwritten by details of its QR
factorization as returned by CGEQRF;
if M < N, A is overwritten by details of its LQ
factorization as returned by CGELQF.
LDA
LDA is INTEGER
The leading dimension of the array A. LDA >= max(1,M).
B
B is COMPLEX array, dimension (LDB,NRHS)
On entry, the matrix B of right hand side vectors, stored
columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
if TRANS = 'C'.
On exit, if INFO = 0, B is overwritten by the solution
vectors, stored columnwise:
if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
squares solution vectors; the residual sum of squares for the
solution in each column is given by the sum of squares of the
modulus of elements N+1 to M in that column;
if TRANS = 'N' and m < n, rows 1 to N of B contain the
minimum norm solution vectors;
if TRANS = 'C' and m >= n, rows 1 to M of B contain the
minimum norm solution vectors;
if TRANS = 'C' and m < n, rows 1 to M of B contain the
least squares solution vectors; the residual sum of squares
for the solution in each column is given by the sum of
squares of the modulus of elements M+1 to N in that column.
LDB
LDB is INTEGER
The leading dimension of the array B. LDB >= MAX(1,M,N).
WORK
WORK is COMPLEX array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK
LWORK is INTEGER
The dimension of the array WORK.
LWORK >= max( 1, MN + max( MN, NRHS ) ).
For optimal performance,
LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
where MN = min(M,N) and NB is the optimum block size.
If LWORK = -1, then a workspace query is assumed; the routine
only calculates the optimal size of the WORK array, returns
this value as the first entry of the WORK array, and no error
message related to LWORK is issued by XERBLA.
INFO
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, the i-th diagonal element of the
triangular factor of A is zero, so that A does not have
full rank; the least squares solution could not be
computed.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Definition at line 182 of file cgels.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 cgels.f(3)