Dear all,
I'm new in perl scripting and I'm trying to creating a matrix from a 3 column file sorting data in a particular manner. In the final matrix I need to have the first column "IDs" on the header of the columns and the second column values on the header of each row. And the value fo the third column in each right position. As follows:
My input look like:
And I need to have an output like this:
Hope to be clear...
thank you for any help!!
Moderator's Comments:
Please use code tags when posting data and code samples!
Last edited by gabrysfe; 11-13-2012 at 01:14 PM..
Reason: code tags, please!
Hello all. I have a problem that I need help solving.
I would like to convert the following file:
human pool1_12 10e-02 45 67
human pool1_1899 10e-01 45 29
human pool1_1829 10e-01 43 26
horse pool1_343 10e-20 65 191
horse pool1_454 10e-09 44 43... (5 Replies)
I need to create a large matrix so that I can feed that matrix to MATLAB for processing. The problem is creating that matrix because my data is completely scattered around files.
1. I have one big dictionary file which has words in newlines, like
apple
orange
pineapple
2. I have some... (3 Replies)
Hi All,
I have a huge matrix file consisting some some millions rows and 6000 columns. The contents are just floating point numbers in the matrix. I want to extract each column (i.e. 6000 of them) and store each column in a separate file.
For example, 1.dat will consist of elements from column... (4 Replies)
Hi all, I'm a newbie in shell scripting and currently I'm trying to create a matrix using bash. The Output will look like this
AB CDE FG
1
2
3
4
5
6
7
I'm stuck on the ABCDEFG display.
printFlightSeats()
{
rows=7
columns=7
for ((i=0;i<=$rows;i++))
do (0 Replies)
I'm trying to create a Matrix using bash. The expected output is
.AB CDE FG
1
2
3
4
5
6
7
I'm a newbie in shell language, really appreciate if there is anyone who can guide me with this.
Double post again, continued here (0 Replies)
Hi all, I'm a newbie in shell scripting and currently I'm trying to create a matrix using bash. The Output will look like this
AB CDE FG
1
2
3
4
5
6
7
I'm stuck on the ABCDEFG display.
printFlightSeats()
{
rows=7
columns=7
for ((i=0;i<=$rows;i++))
do (2 Replies)
Greetings, salutations.
I have a 3 column csv file with ~13 million rows and I would like to generate a correlation matrix. Interestingly, you all previously provided a solution to the inverse of this problem. Thread title: "awk? adjacency matrix to adjacency list / correlation matrix to list"... (6 Replies)
Hello,
Greetings!
please help me produce the following solution. I need
to produce one big matrix file from several files in different levels.
If it helps, the index folder provides information on chromosome index and
the data folder provides information on values for chromosomes.
there... (8 Replies)
I want to create a Matrix template that uses vector. For the time being I want to create the following operations. I need setting the implementation for the operations.
Maybe I do not have to use a pointer either.
template <class T>
class Matrix {
protected:
typedef vector<T>* ... (2 Replies)
Discussion started by: kristinu
2 Replies
LEARN ABOUT REDHAT
glmultmatrixf
GLMULTMATRIX(3G)GLMULTMATRIX(3G)NAME
glMultMatrixd, glMultMatrixf - multiply the current matrix with the specified matrix
C SPECIFICATION
void glMultMatrixd( const GLdouble *m )
void glMultMatrixf( const GLfloat *m )
PARAMETERS
m Points to 16 consecutive values that are used as the elements of a 4x4 column-major matrix.
DESCRIPTION
glMultMatrix multiplies the current matrix with the one specified using m, and replaces the current matrix with the product.
The current matrix is determined by the current matrix mode (see glMatrixMode). It is either the projection matrix, modelview matrix, or
the texture matrix.
EXAMPLES
If the current matrix is C, and the coordinates to be transformed are, v=(v[0],v[1],v[2],v[3]). Then the current transformation is Cxv, or
c[0] c[4] c[8] c[12] v[0]
(c[1] c[5] c[9] c[13])x(v[1])
c[2] c[6] c[10] c[14] v[2]
c[3] c[7] c[11] c[15] v[3]
Calling glMultMatrix with an argument of m=m[0],m[1],...,m[15] replaces the current transformation with (CxM)xv, or
c[0] c[4] c[8] c[12] m[0] m[4] m[8] m[12] v[0]
(c[1] c[5] c[9] c[13])x(m[1] m[5] m[9] m[13])x(v[1])
c[2] c[6] c[10] c[14] m[2] m[6] m[10] m[14] v[2]
c[3] c[7] c[11] c[15] m[3] m[7] m[11] m[15] v[3]
Where 'x' denotes matrix multiplication, and v is represented as a 4x1 matrix.
NOTES
While the elements of the matrix may be specified with single or double precision, the GL may store or operate on these values in less than
single precision.
In many computer languages 4x4 arrays are represented in row-major order. The transformations just described represent these matrices in
column-major order. The order of the multiplication is important. For example, if the current transformation is a rotation, and
glMultMatrix is called with a translation matrix, the translation is done directly on the coordinates to be transformed, while the rotation
is done on the results of that translation.
ERRORS
GL_INVALID_OPERATION is generated if glMultMatrix is executed between the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_MATRIX_MODE
glGet with argument GL_COLOR_MATRIX
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
SEE ALSO glLoadIdentity(3G), glLoadMatrix(3G), glMatrixMode(3G), glPushMatrix(3G)GLMULTMATRIX(3G)