Matrix construction


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Matrix construction
# 1  
Old 12-09-2009
Matrix construction

Hi

I have to construct a rectangular matrix with 6012 rows and 2221 columns.
Here the rows and columns were given by alphanumeric ids in a file named row.txt and column.txt respectively. with this row nd column ids I have to construct a matrix ie 6012*2221 and compare the column ids with the row ids which s given in a third file named rowandcolumn.txt and if column1 id present in row1 id means it should be given as 1 or else 0. I have to write a perl program for this. pls help me. I have given the samples files..

Sample files
row.txt
Code:
 A0AV02
  A0AVK6
  A0AVT1
  A0FGR8
  A0PJE2 etc

column.txt
Code:
PF00001
  PF00002
  PF00003 etc

rowandcolumn.txt
Code:
 A0AVT1    PF00899;PF02134;PF09358; PF10585;
A0FGR8    PF00168;
A0PJE2    PF00106;
A1L0T0    PF00205;PF02775;PF02776;
A1XBS5    PF06730;


Last edited by zaxxon; 12-09-2009 at 05:22 AM.. Reason: code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep command construction

Hi, I have an array variable "arr" that reads string from a file "vari.txt". Thus, the array will be of variable length depending how many entries are present in "vari.txt" I use a for loop to traverse through the array. However, i need a grep command to grep for a file "output.txt" and... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. Web Development

Website construction nowaday!

Hello, Actually I am not sure how to ask this question, which is about the technique advance on website construction/design. Compared with HTML/CSS, which ones are the most popular for website construction? My colleague recommends Drupal for Linux platform. Any other? Thanks! Yifang (4 Replies)
Discussion started by: yifangt
4 Replies

3. 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

4. Shell Programming and Scripting

case construction for basic Arithmetics calculation

the scrip (q4.sh) should perform the following calcuation (+, -, / and *) it should be used like this: q4.sh number1 operation number2 I wrote it already but the "*" does not work. #!/bin/bash #Date: 2010.10.19 # un script qui utilisera une instruction case pour effectuer des opérations... (6 Replies)
Discussion started by: flash80
6 Replies

5. Shell Programming and Scripting

Help with regex construction

I am trying to construct a regular expression that will filter a log file containing the following table: aP mP mC,mI oP oC oF oI tP tI hP ... (8 Replies)
Discussion started by: euval
8 Replies

6. Shell Programming and Scripting

Matrix construction

Hi experts How to construct a rectangular matrix for a text file with 6012 rows and 2221 columns. Thank You (1 Reply)
Discussion started by: riyabio
1 Replies

7. Shell Programming and Scripting

diagonal matrix to square matrix

Hello, all! I am struggling with a short script to read a diagonal matrix for later retrieval. 1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098 1.000 0.111 0.412 0.115 0.058 0.091 0.190 0.045 0.058 1.000 0.205 0.542 0.335 0.054 0.117 0.203 0.125 1.000 0.587 0.159 0.357... (11 Replies)
Discussion started by: yifangt
11 Replies

8. Cybersecurity

Password Construction

Could someone please help, I am new to unix and I am trying to do the following: o Each password must have at least eight characters. Only the first eight characters are significant. PASSLENGTH is found in /etc/default/passwd and is set to 6. ... (1 Reply)
Discussion started by: tumbikikani
1 Replies
Login or Register to Ask a Question