Sponsored Content
Top Forums UNIX for Dummies Questions & Answers convert matrix to row and columns Post 302324864 by tintin72 on Friday 12th of June 2009 04:46:51 AM
Old 06-12-2009
Data convert matrix to row and columns

Dear Unix Gurus,

I have a sample data set that looks like this

Code:
 
    y1  y2  y3  y4  y5
x1 0.3 0.5 2.3 3.1 5.1
x2 1.2 4.1 3.5 1.7 1.2
x3 3.1 2.1 1.0 4.1 2.1
x4 5.0 4.0 6.0 7.0 1.1

I want to open it up so that I get
Code:
x1 y1 0.3 
x2 y1 1.2 
x3 y1 3.1 
x4 y1 5.0 
x1 y2 0.5
x2 y2 4.1
x3 y2 2.1
x4 y2 4.0
x1 y3 2.3 
x2 y3 3.5
x3 y3 1.0
x4 y3 6.0
x1 y4 3.1
x2 y4 1.7 
x3 y4 4.1 
x4 y4 7.0
x1 y5 5.1
x2 y5 1.2 
x3 y5 2.1 
x4 y5 1.1

I'm stuck. Smilie Can someone help? Thanks a lot.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to convert 2 column data into multiple columns based on a keyword in a row??

Hi Friends I have the following input data in 2 columns. SNo 1 I1 Value I2 Value I3 Value SNo 2 I4 Value I5 Value I6 Value I7 Value SNo 3 I8 Value I9 Value ............... ................ SNo N (1 Reply)
Discussion started by: ks_reddy
1 Replies

2. Shell Programming and Scripting

Convert columns to single row

Hello all I have data like 1 2 3 4 5 I wish my output would be like 1,2,3,4,5 For this i have executed 'BEGIN {FS="\n"; ORS=","} {print $0}' test and got the output as 1,2,3,4,5, I do not want to have , at the end of 5. output should be like (5 Replies)
Discussion started by: vasuarjula
5 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

Convert columns to row using awk

Hi I need to convert some columns form a html file to rows. I do manage to make it works without help (some proud :) ) For some reason the offline status is not in bold, so I do need to remove the <b> tag from the other field to make this to work. All fields are not needed, so I test and... (5 Replies)
Discussion started by: Jotne
5 Replies

5. UNIX for Dummies Questions & Answers

Convert nxm Matrix into columns of data

Dear Unixers, I'm having some difficulty in converting an n x m data matrix into a dataset of 3 columns and nxm rows. As an example I want to convert this dataset 2 3 4 5 2 0.0 0.0 0.1 0.1 6 -0.3 2.0 0.0 0.3 7 -0.6 -1.1 0.5 0.3 9 -0.9 -4.1 -0.7 0.5 ... (2 Replies)
Discussion started by: tintin72
2 Replies

6. Shell Programming and Scripting

awk to convert table-by-row to matrix table

Hello, I need some help to reformat this table-by-row to matrix? infile: site1 A:o,p,q,r,s,t site1 C:y,u site1 T:v,w site1 -:x,z site2 A:p,r,t,v,w,z site2 C:u,y site2 G:q,s site2 -:o,x site3 A:o,q,s,t,u,z site3 C:y site3 T:v,w,x site3 -:p,routfile: SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies

7. Shell Programming and Scripting

Convert row to columns start from nth column

Dear All, We have input like this: 161 57 1378 176 1392 262 1444 441 1548 538 1611 670 1684 241 57 1378 208 1393 269 1447 444 1549 538 1610 677 1700 321 ... (4 Replies)
Discussion started by: attila
4 Replies

8. Shell Programming and Scripting

How to convert 2 columns into matrix -awk?

How can i convert two columns in to o and 1 matrix. thnks Input a c1 b c2 c c1 d c3 e c4 output c1 c2 c3 c4 a 1 0 0 0 b 0 1 0 0 c 1 0 0 0 d 0 0 ... (5 Replies)
Discussion started by: quincyjones
5 Replies
SOAPCPP2(1)						      General Commands Manual						       SOAPCPP2(1)

NAME
soapcpp2 - the gSOAP Stub and Skeleton Compiler for C and C++ SYNOPSIS
soapcpp2 [OPTIONS] INPUT DESCRIPTION
Please see /usr/share/doc/gsoap/soapdoc2.html for details. Create stubs and client and server code from input INPUT or standard input if INPUT is not specified. OPTIONS
-1 Generate SOAP 1.1 bindings. -2 Generate SOAP 1.2 bindings. -C Generate client-side code only. -S Generate server-side code only. -T Generate server-side auto-test code. -L Do not generate soapClientLib/soapServerLib. -a Use SOAPAction HTTP/WSA header to invoke server-side operations. -b Serialize byte arrays char[N] as string. -c Generate C source code. -dpath Use path to save files. -e Generate SOAP RPC encoding style bindings. -fN File split of N XML serializer implementations per file (N>=10). -h Display help info. -Ipath use path(s) for #import. -i Generate C++ service proxies and objects inherited from soap struct. -j Generate C++ service proxies and objects that share a soap struct. -k Generate data structure walkers (experimental). -l Generate linkable modules (experimental). -m Generate Matlab(tm) code for MEX compiler. -n Use service name to rename service functions and namespace table. -pname Save files with new prefix name instead of soap. -qname Use name as the C++ namespace of all declarations. -s Generate deserialization code with strict XML validation checks. -t Generate code for fully xsi:type typed SOAP/XML messaging. -u Uncomment comments in WSDL/schema output by suppressing XML comments. -v Display version info. -w Do not generate WSDL and schema files. -x Do not generate sample XML message files. -y Include C/C++ type access information in sample XML messages. SEE ALSO
wsdl2h(1). AUTHOR
This manual page was written by Thomas Wana <greuff@debian.org>, for the Debian project (but may be used by others). Juni 27, 2003 SOAPCPP2(1)
All times are GMT -4. The time now is 12:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy