11-20-2007
Script to sort data
Hi All,
I have a .csv file with 3 columns called nLats, nLongs, and fRes. in following format :
"nLats","nLongs","fRes"
0,0,-1
0,1,-1
0,2,-1
0,3,-1
0,4,-1
.........
.........
0,143,-1 nLats increments at nLongs=143
1,0, -1
1,1, -1
..........
..........
1,143,-1
2,0,-1
2,1,-1
.........
.........
2,143,-1
Goes till nLats = 71.
I wish to sort fRes value in nLats*nLons Array, ie an array of 72*144.
(nLats 1st) -1 -1 -1 -1 -1......................-1
.............................................
.............................................
.............................................
(nLats 72nd)-1 -1 -1 -1 -1.....................-1
the max value of nLats=71 starting from 0, ie 72 rows
the max value of nLongs=143 starting from 0, ie 144 columns.
How shall I proceed???
Thanks all,
wiz_max
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!
I'm trying to sort a file.dat with the sort command. The data contained by file.dat is similar to the data set below:
100.000
99.000
110.000
55.000
113.000
33.000
25.000
9.000
15.000
It is relatively easy to sort the data in ascending or descending order, but the problem is... (11 Replies)
Discussion started by: bjorb
11 Replies
2. Shell Programming and Scripting
Hi,
Can someone here help sorting the following data in numeric order?
INPUT:
FIRST abc(3) def(13) fgh(1) ijk(6) abc(2)
SECOND dfe(10) abc(4) hij(19) tlm(1) hij(1) hub(10) abc(1) fed(3)
OTHERS hij(10) mok(4) bub(19) hij(1) abc(2) abc(15) abc(1) hij(3)
OUTPUT:
FIRST def(13) ijk(6)... (12 Replies)
Discussion started by: need_help
12 Replies
3. Shell Programming and Scripting
Im trying to sort all this data.
I need to get a list out of the data (websites) and just list them out can anyone point me in the right direction. Im working with dans guardian.
2009.6.10 6:26:50 - 192.168.42.200... (5 Replies)
Discussion started by: darknirvana
5 Replies
4. Shell Programming and Scripting
So, I will be working with someone and basically we are trying to build a form that is submitted most likely via the web and the data is just a string of numbers.
like:
19383882872201110929282821818182827349190102837364718191001932873711
Now, each number is part of a numerical value of... (4 Replies)
Discussion started by: tlarkin
4 Replies
5. Shell Programming and Scripting
Hi,
I'm a learner of PERL programming.
I've a input file with the below data:
SWAT_5, 1703, 2010-09-21
SWAT_6, 2345, 2010-09-21
SWAT_7, 1792, 2010-09-21
SWAT_8, 1662, 2010-09-21
SWAT_9, 1888, 2010-09-21
VXHARP_1, 171, 2010-09-21
I need to sort this data based on the second... (6 Replies)
Discussion started by: ganapati
6 Replies
6. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
7. Shell Programming and Scripting
Hello,
I have a file and i want to sort by third column and extract the three top lines of each group, it is determined by the second column (144, 89, 55, etc).
Could you please help me with the appropiate awk shell script
XLY-XLP 144 0.592772 XLY-XLE 144 0.798121 ... (3 Replies)
Discussion started by: csierra
3 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Discussion started by: kowit010
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I need to filter the output of a command and display certain data only. How can i do this ?
My file contain:
$ cat abc.txt
<testcase title="AAA_100">
<testcase title="BBB_200">
<testcase title="CCC_300">
<testcase title="DDD">
... (3 Replies)
Discussion started by: crazydude80
3 Replies
10. Shell Programming and Scripting
Hello All,
I have one file with multiple lines records like as below.. I need to extract only BFG and corresponding BSG record/line. for evry BFG there is one BSG record is there as mentioned in BOLD and so on...
BFG BR 00001 20140724 000 000 ? ?
BLG UVR QPR 01 380 ? ? 999 0 0 0 ?
BLC... (2 Replies)
Discussion started by: Riverstone
2 Replies
LEARN ABOUT CENTOS
sgeqpf.f
sgeqpf.f(3) LAPACK sgeqpf.f(3)
NAME
sgeqpf.f -
SYNOPSIS
Functions/Subroutines
subroutine sgeqpf (M, N, A, LDA, JPVT, TAU, WORK, INFO)
SGEQPF
Function/Subroutine Documentation
subroutine sgeqpf (integerM, integerN, real, dimension( lda, * )A, integerLDA, integer, dimension( * )JPVT, real, dimension( * )TAU, real,
dimension( * )WORK, integerINFO)
SGEQPF
Purpose:
This routine is deprecated and has been replaced by routine SGEQP3.
SGEQPF computes a QR factorization with column pivoting of a
real M-by-N matrix A: A*P = Q*R.
Parameters:
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
A
A is REAL array, dimension (LDA,N)
On entry, the M-by-N matrix A.
On exit, the upper triangle of the array contains the
min(M,N)-by-N upper triangular matrix R; the elements
below the diagonal, together with the array TAU,
represent the orthogonal matrix Q as a product of
min(m,n) elementary reflectors.
LDA
LDA is INTEGER
The leading dimension of the array A. LDA >= max(1,M).
JPVT
JPVT is INTEGER array, dimension (N)
On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
to the front of A*P (a leading column); if JPVT(i) = 0,
the i-th column of A is a free column.
On exit, if JPVT(i) = k, then the i-th column of A*P
was the k-th column of A.
TAU
TAU is REAL array, dimension (min(M,N))
The scalar factors of the elementary reflectors.
WORK
WORK is REAL array, dimension (3*N)
INFO
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Further Details:
The matrix Q is represented as a product of elementary reflectors
Q = H(1) H(2) . . . H(n)
Each H(i) has the form
H = I - tau * v * v**T
where tau is a real scalar, and v is a real vector with
v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
The matrix P is represented in jpvt as follows: If
jpvt(j) = i
then the jth column of P is the ith canonical unit vector.
Partial column norm updating strategy modified by
Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
University of Zagreb, Croatia.
-- April 2011 --
For more details see LAPACK Working Note 176.
Definition at line 143 of file sgeqpf.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 sgeqpf.f(3)