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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
fec
FEC(3) BSD Library Functions Manual FEC(3)NAME
fec_new, fec_encode, fec_encode, fec_free -- An erasure code in GF(2^m)
SYNOPSIS
#include <fec.h>
void *
fec_new(int k, int n);
void
fec_encode(void *code, void *data[], void *dst, int i, int sz);
int
fec_decode(void *code, void *data[], int i[], int sz);
void *
fec_free(void *code);
DESCRIPTION
This library implements a simple (n,k) erasure code based on Vandermonde matrices. The encoder takes k packets of size sz each, and is able
to produce up to n different encoded packets, numbered from 0 to n-1, such that any subset of k of them permits reconstruction of the origi-
nal data.
The data structures necessary for the encoding/decoding must first be created using calling fec_new() with the desired parameters. The code
descriptor returned by the function must be passed to other functions, and destroyed calling fec_free()
Allowed values for k and n depend on a compile-time value of GF_BITS and must be k <= n <= 2^GF_BITS. Best performance is achieved with
GF_BITS=8, although the code supports also GF_BITS=16.
Encoding is done by calling fec_encode() and passing it pointers to the code descriptor, the source and destination data packets, the index
of the packet to be produced, and the size of the packet.
fec_decode() with pointers to the code, received packets, indexes of received packets, and packet size. Decoding is done in place, possibly
shuffling the arrays passed as parameters. Decoding is deterministic as long as the received packets are different. The decoding procedure
does some limited testing on this and returns if parameters are invalid.
EXAMPLE
#include <fec.h>
/*
* example of sender code
*/
void *code ;
int n, k ;
void *src[] ;
void *pkt ;
code = new_code (k, n );
for (i = 0 ; i < k ; i++ )
src[i] = .. pointer to i-th source packet ..
for (each packet to transmit) {
i = ... index of the packet ;
fec_encode(code, src, pkt, i, size) ;
.. use packet in pkt
}
fec_free(code) ;
/*
* example of receiver code
*/
void *code ;
int n, k ;
void *data[] ;
int *ix[] ;
code = new_code (k, n );
for (i = 0 ; i < k ; i++ ) {
... receive a new packet ...
data[i] = .. pointer to i-th source packet ..
ix[i] = .. index of i-th source packet ..
}
fec_decode(code, data, ix, size) ;
/*
* now data[] has pointers to the source packets
*/
Please direct bug reports to luigi@iet.unipi.it .
BSD July 15, 1998 BSD