Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Mathematical manipulation of a text file Post 302770861 by DGPickett on Monday 18th of February 2013 05:17:24 PM
Old 02-18-2013
Read all the fields into an array, do your math, print out the result. Adding the second dimension is left to the student.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Text file manipulation

Hi, I need to remove lines from a text file that are less than certain length in UNIX. For example, test.txt file contains the following lines: abcdefghijklmnopqrstuvwxyz. 123456789009876543211234567 This line to be removed. zyxwvutsrqponmlkjihgfedcba. The length of each line is supposed... (5 Replies)
Discussion started by: svannala
5 Replies

2. UNIX for Dummies Questions & Answers

Text file manipulation

I am a new unix user & I wanted to work with unix as it is very good in text manipulations. I need a little help. I will be grateful if someone can help me out. I need help in grepping a pattern of numbers from one file to another file. Specific details are as follows: File one contains only... (4 Replies)
Discussion started by: Ezy
4 Replies

3. Shell Programming and Scripting

File text manipulation

What I am trying to do is make a script that will add a port number within a section of a file if it already doesn't exist in that section of the file. The particular line that I would like to add the port number to in the file is formatted like this: TCPPORTS="25 80 125 443 8080 10000" For... (3 Replies)
Discussion started by: nullifx
3 Replies

4. Shell Programming and Scripting

Text File Manipulation

Hi, I need to write shell script for the scenario explained below - datafile.txt AcctNum,code,Region,,,, 12345451,AN ,abaab 12345452,AN ,xccxc 76677545,RP ,acxcc 43567878,RP ,afghh 32190900,AN ,afrfrf 87312345,AN ,aqaw I have a text file (datafile.txt)... (1 Reply)
Discussion started by: ravigupta2u
1 Replies

5. UNIX for Dummies Questions & Answers

Text File Manipulation Help

Hi I've two text files FILE_1 and FILE_2 as shown below: FILE_1.txt CO Contig1 342 12 11 U GGGCTGACGTGGCCGCTAATACGACTCACTATAGGG*AGAGAAGTCATTTTCTTGTTTAG BQ 35 35 35 50 50 50 50 50 50 50 50 60 65 65 65 65 65 65 65 65 65 65 65 65 50 AF GP5UOVN01AOPE0 U 1 AF GP5UOVN01AT8W3 U 1 ... (1 Reply)
Discussion started by: Fahmida
1 Replies

6. Shell Programming and Scripting

Awk to convert a text file to CSV file with some string manipulation

Hi , I have a simple text file with contents as below: 12345678900 971,76 4234560890 22345678900 5971,72 5234560990 32345678900 71,12 6234560190 the new csv-file should be like: Column1;Column2;Column3;Column4;Column5 123456;78900;971,76;423456;0890... (9 Replies)
Discussion started by: FreddyDaKing
9 Replies

7. UNIX for Dummies Questions & Answers

Adding a column to a text file based on mathematical manipulation

Hi, I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks! Input: chr1 788822 rs11240777 chr1 1008567 rs9442372... (2 Replies)
Discussion started by: evelibertine
2 Replies

8. Programming

String Manipulation in a text file

Hi I have a requirement to write a script but not sure which is the best way to approach this I have not worked in sed but I'm aware that its robust for file extraction requirements I have a scripting task. I already developed the code in perl but the script is taking almost 2 mins for... (5 Replies)
Discussion started by: John Trevor
5 Replies

9. Shell Programming and Scripting

Text file manipulation

Hi Gurus, I have a question I have a flat file like below with three fields (3 rd field is amt) ad|B|500 cc||100 dd|C|600 ee||900 Need to write a code in such a way that when second field is empty then do sum of third field So in this case it will be 100 +900 I tried but no luck... (1 Reply)
Discussion started by: patricjemmy6
1 Replies

10. UNIX for Dummies Questions & Answers

Text File Manipulation

Hello, Supposing I had a huge list as follows: TAC manufacturer Device Type 1392600 LG D959 LG-D959TS FeaturePhone 1409700 LG V410 FeaturePhone 35150806 LG F350S FeaturePhone 35165206 Samsung GT-E1200 FeaturePhone 35194505 Nokia Asha 200 FeaturePhone but I want to make it look like... (3 Replies)
Discussion started by: Cludgie
3 Replies
sgeev.f(3)							      LAPACK								sgeev.f(3)

NAME
sgeev.f - SYNOPSIS
Functions/Subroutines subroutine sgeev (JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, WORK, LWORK, INFO) SGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices Function/Subroutine Documentation subroutine sgeev (characterJOBVL, characterJOBVR, integerN, real, dimension( lda, * )A, integerLDA, real, dimension( * )WR, real, dimension( * )WI, real, dimension( ldvl, * )VL, integerLDVL, real, dimension( ldvr, * )VR, integerLDVR, real, dimension( * )WORK, integerLWORK, integerINFO) SGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices Purpose: SGEEV computes for an N-by-N real nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors. The right eigenvector v(j) of A satisfies A * v(j) = lambda(j) * v(j) where lambda(j) is its eigenvalue. The left eigenvector u(j) of A satisfies u(j)**T * A = lambda(j) * u(j)**T where u(j)**T denotes the transpose of u(j). The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real. Parameters: JOBVL JOBVL is CHARACTER*1 = 'N': left eigenvectors of A are not computed; = 'V': left eigenvectors of A are computed. JOBVR JOBVR is CHARACTER*1 = 'N': right eigenvectors of A are not computed; = 'V': right eigenvectors of A are computed. N N is INTEGER The order of the matrix A. N >= 0. A A is REAL array, dimension (LDA,N) On entry, the N-by-N matrix A. On exit, A has been overwritten. LDA LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). WR WR is REAL array, dimension (N) WI WI is REAL array, dimension (N) WR and WI contain the real and imaginary parts, respectively, of the computed eigenvalues. Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. VL VL is REAL array, dimension (LDVL,N) If JOBVL = 'V', the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. If JOBVL = 'N', VL is not referenced. If the j-th eigenvalue is real, then u(j) = VL(:,j), the j-th column of VL. If the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and u(j+1) = VL(:,j) - i*VL(:,j+1). LDVL LDVL is INTEGER The leading dimension of the array VL. LDVL >= 1; if JOBVL = 'V', LDVL >= N. VR VR is REAL array, dimension (LDVR,N) If JOBVR = 'V', the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If JOBVR = 'N', VR is not referenced. If the j-th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and v(j+1) = VR(:,j) - i*VR(:,j+1). LDVR LDVR is INTEGER The leading dimension of the array VR. LDVR >= 1; if JOBVR = 'V', LDVR >= N. WORK WORK is REAL 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,3*N), and if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good performance, LWORK must generally be larger. 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 QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed; elements i+1:N of WR and WI contain eigenvalues which have converged. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 189 of file sgeev.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 sgeev.f(3)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy