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
imager::preprocess
Imager::Preprocess(3pm) User Contributed Perl Documentation Imager::Preprocess(3pm)NAME
Imager::Preprocess - simple preprocessor for handling multiple sample sizes
SYNOPSIS
/* in the source: */
#code condition true to work with 8-bit samples
... code using preprocessor types/values ...
#/code
# process and make #line directives
perl -MImager::Preprocess -epreprocess foo.im foo.c
# process and no #line directives
perl -MImager::Preprocess -epreprocess -l foo.im foo.c
DESCRIPTION
This is a simple preprocessor that aims to reduce duplication of source code when implementing an algorithm both for 8-bit samples and
double samples in Imager.
Imager's "Makefile.PL" currently scans the MANIFEST for .im files and adds Makefile files to convert these to .c files.
The beginning of a sample-independent section of code is preceded by:
#code expression
where expression should return true if processing should be done at 8-bits/sample.
You can also use a #code block around a function definition to produce 8-bit and double sample versions of a function. In this case #code
has no expression and you will need to use IM_SUFFIX() to produce different function names.
The end of a sample-independent section of code is terminated by:
#/code
#code sections cannot be nested.
#/code without a starting #code is an error.
The following types and values are defined in a #code section:
o IM_GPIX("im", "x", "y", &col)
o IM_GLIN("im", "l", "r", "y", "colors")
o IM_PPIX("im", "x", "y", &col)
o IM_PLIN("im", "x", "y", "colors")
o IM_GSAMP("im", "l", "r", "y", "samples", "chans", "chan_count")
These correspond to the appropriate image function, eg. IM_GPIX() becomes i_gpix() or i_gpixf() as appropriate.
o IM_ADAPT_COLORS("dest_channels", "src_channels", "colors", "count")
Call i_adapt_colors() or i_adapt_fcolors().
o IM_FILL_COMBINE("fill") - retrieve the combine function from a fill object.
o IM_FILL_FILLER("fill") - retrieve the fill_with_* function from a fill object.
o IM_SAMPLE_MAX - maximum value for a sample
o IM_SAMPLE_MAX2 - maximum value for a sample, squared
o IM_SAMPLE_T - type of a sample (i_sample_t or i_fsample_t)
o IM_COLOR - color type, either i_color or i_fcolor.
o IM_WORK_T - working sample type, either int or double.
o IM_Sf - format string for the sample type, "%d" or "%f".
o IM_Wf - format string for the work type, "%d" or "%f".
o IM_SUFFIX(identifier) - adds _8 or _double onto the end of identifier.
o IM_EIGHT_BIT - this is a macro defined only in 8-bit/sample code.
Other types, functions and values may be added in the future.
AUTHOR
Tony Cook <tonyc@cpan.org>
perl v5.14.2 2011-06-06 Imager::Preprocess(3pm)