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)
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)
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)
Howdy,
I need to convert an association data matrix, currently in a two-column format, into a matrix with numbers indicating the number of associations. I've been looking around for AWK code in the list, but could not find anything. Here's an example of what I want to perform:
original... (10 Replies)
is it possible to count the number of keys based on state and cell and output it as a simple matrix.
Ex: cell1-state1 has 2 keys
cell3-state1 has 4 keys.
Note: Insert 0 if no data available.
input
key states cell
key1 state1 cell1
key1 state2 cell1
key1 ... (21 Replies)
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)
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)
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)
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
LEARN ABOUT V7
libnetpbm
Libnetpbm manual(3) Library Functions Manual Libnetpbm manual(3)NAME
libnetpbm - general introduction to the netpbm library
DESCRIPTION
libnetpbm is a C programming library for reading, writing, and manipulating Netpbm images. It also contains a few general graphics manipu-
lation tools, but it is not intended to be a graphics tools library. For graphics tools, Netpbm expects you to run the Netpbm programs.
From a C program, the libnetpbm function pm_system() makes this easy. However, since it creates a process and execs a program, this may be
too heavyweight for some applications.
To use libnetpbm services in your C program, #include the pam.h interface header file. For historical reasons, you can also get by in some
cases with pbm.h, pgm.h, ppm.h, or pnm.h, but there's really no point to that anymore.
The libnetpbm functions are divided into these categories:
o PBM functions. These have names that start with pbm and work only on PBM images.
o PGM functions. These have names that start with pgm and work only on PGM images.
o PPM functions. These have names that start with ppm and work only on PPM images.
o PNM functions. These have names that start with pnm and work on PBM, PGM, and PPM images.
o PAM functions. These also have names that start with pnm and work on all the Netpbm image types.
o PM functions. These are utility functions that aren't specific to any particular image format.
For new programming, you rarely need to concern yourself with the PBM, PGM, PPM, and PNM functions, because the newer PAM functions do the
same thing and are easier to use. For certain processing of bi-level images, the PBM functions are significantly more efficient, though.
libnetpbm has a backward compatibility feature that means a function designed to read one format can read some others too, converting on
the fly. In particular, a function that reads a PGM image will also read a PBM image, but converts it as it reads it so that for program-
ming purposes, it is a PGM image. Similarly, a function that reads PPM can read PBM and PGM as well. And a function that reads PBM, PGM,
or PPM can read a PAM that has an equivalent tuple type.
For each of the five classes of libnetpbm image processing functions, libnetpbm has in in-memory representation for a pixel, a row, and a
whole image. Do not confuse this format with the actual image format, as you would see in a file. The libnetpbm in-memory format is
designed to make programming very easy. It is sometimes extremely inefficient, even more than the actual image format. For example, a
pixel that a PPM image represents with 3 bytes, libnetpbm's PAM functions represent with 16 bytes. A pixel in a PBM image is represented
by a single bit, but the PNM functions represent that pixel in memory with 96 bits.
See LibnetpbmUser'sManual(3)
for the basics on using libnetpbm in a program.
You can look up the reference information for a particular function in ThelibnetpbmDirectory(1)
Before Netpbm release 10 (June 2002), this library was split into four: libpbm, libpgm, libppm, and libpnm. That's largely the reason for
the multiple sets of functions and scattered documentation.
netpbm documentation December 2003 Libnetpbm manual(3)