Sponsored Content
Top Forums Shell Programming and Scripting extract data from a data matrix with filter criteria Post 302307582 by ssshen on Wednesday 15th of April 2009 08:10:36 PM
Old 04-15-2009
extract data from a data matrix with filter criteria

Here is what old matrix look like,

IDs X1 X2 Y1 Y2
10914061 -0.364613333 -0.362922333 0.001691 -0.450094667
10855062 0.845956333 0.860396667 0.014440333 1.483899333
10844119 -0.256424667 -0.397806 -0.141381333 -0.275729667
10857231 -0.048169667 -0.117945667 -0.069776 0.034550333
10918191 -0.020050333 -0.013577 0.006473333 -0.096175667
10909733 0.162614333 0.234994333 0.07238 0.182145
10808085 0.184618667 0.626846333 0.442227667 0.266913667
10896632 -0.10846 -0.074073333 0.034386667 -0.212201667
10842200 -0.355892 -0.080373333 0.275518667 -0.658731667
10820400 -0.039500333 0.142172333 0.181672667 -0.048522667
10790305 0.060801667 0.296146 0.235344333 0.352136333
10850793 0.192093667 0.016334333 -0.175759333 0.018589
10898454 0.266829667 0.251706333 -0.015123333 0.358631
10900279 -0.135841333 -0.208101 -0.072259667 -0.08459
10915745 -0.426376 -0.090368 0.336008 -0.50354
10879483 0.171624333 -0.022833667 -0.194458 0.414899333

extract rows when |X1| or |X2| or |Y1| or |Y2| >= 0.5 and make them a new matrix.

Thanks in advance!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

changing data into matrix form

Hi, I have a file whose structure is like this 7 7 1 2 3 4 5 1 3 4 8 6 1 4 5 6 0 2 6 8 3 8 2 5 7 8 0 5 7 9 4 1 3 8 0 2 2 3 5 6 8 basically first two row tell the number of rows and column but the data following them are not arranged in that format. now i want to create another... (1 Reply)
Discussion started by: g0600014
1 Replies

2. Shell Programming and Scripting

Merge 70 files into one data matrix

Hi, I have a list of 70 files in a directory and I need to merge the content of each file into one big matrix file (71 columns x 3060 rows). Each file has the following format only two columns per file: unique identifier1 randomtext1 randomtext1 a 5 b 3 c 6 d 3 e 2... (11 Replies)
Discussion started by: labrazil
11 Replies

3. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

4. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

5. Shell Programming and Scripting

Invert Matrix of Data - Perl

I have columnar data in arrays perl, Example - @a = (1,2,3); @array1 = (A,B,C); @array2 = (D,E,F); @array3 = (I,R,T); I want the data to be formatted and printed as 1 A D I 2 B E F 3 C F T and so on... (8 Replies)
Discussion started by: dinjo_jo
8 Replies

6. Shell Programming and Scripting

Extract data based on specific search criteria

I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
Discussion started by: jaygamini
4 Replies

7. Ubuntu

How to convert full data matrix to linearised left data matrix?

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)
Discussion started by: evoll
8 Replies

8. Shell Programming and Scripting

Reformatting data in matrix form

Hi, Some assistance with respect to the following problem will be very helpful. I want to reformat my dataset in the following manner for subsequent analysis. I have first column values (which repeat for each value of 2nd column) which are names, the second column specifies position ad the... (1 Reply)
Discussion started by: newbie83
1 Replies

9. Shell Programming and Scripting

[Solved] Converting the data into matrix with 0's and 1's

I have a file that contains 2 columns tag,pos cat input_file tag pos atg 10 ata 16 agt 15 agg 19 atg 17 agg 14 I have used following command to sort the file based on second column sort -k 2 input_file tag pos atg 10 agg 14 agt 15 ata 16 agg 19 atg 17 (2 Replies)
Discussion started by: raj_k
2 Replies

10. Shell Programming and Scripting

Convert data into tabular matrix

Hi There, I want to convert the following data into tabular matrix, based on column 4th and 5th, and output the column 10th value chr1 2804449 2804450 NACpG_1 window1 + chr1 2804443 2804475 1 chr1 2804450 2804451 NACpG_1 window2 + chr1 2804443 ... (3 Replies)
Discussion started by: ChiragNepal
3 Replies
slapmr.f(3)							      LAPACK							       slapmr.f(3)

NAME
slapmr.f - SYNOPSIS
Functions/Subroutines subroutine slapmr (FORWRD, M, N, X, LDX, K) SLAPMR rearranges rows of a matrix as specified by a permutation vector. Function/Subroutine Documentation subroutine slapmr (logicalFORWRD, integerM, integerN, real, dimension( ldx, * )X, integerLDX, integer, dimension( * )K) SLAPMR rearranges rows of a matrix as specified by a permutation vector. Purpose: SLAPMR rearranges the rows of the M by N matrix X as specified by the permutation K(1),K(2),...,K(M) of the integers 1,...,M. If FORWRD = .TRUE., forward permutation: X(K(I),*) is moved X(I,*) for I = 1,2,...,M. If FORWRD = .FALSE., backward permutation: X(I,*) is moved to X(K(I),*) for I = 1,2,...,M. Parameters: FORWRD FORWRD is LOGICAL = .TRUE., forward permutation = .FALSE., backward permutation M M is INTEGER The number of rows of the matrix X. M >= 0. N N is INTEGER The number of columns of the matrix X. N >= 0. X X is REAL array, dimension (LDX,N) On entry, the M by N matrix X. On exit, X contains the permuted matrix X. LDX LDX is INTEGER The leading dimension of the array X, LDX >= MAX(1,M). K K is INTEGER array, dimension (M) On entry, K contains the permutation vector. K is used as internal workspace, but reset to its original value on output. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: September 2012 Definition at line 105 of file slapmr.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 slapmr.f(3)
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy