Sponsored Content
Top Forums Shell Programming and Scripting PERL: How do I get both sizes of a matrix? Post 302137749 by foo.bar on Wednesday 26th of September 2007 05:25:35 PM
Old 09-26-2007
Great! It works! I just needed the {} brackets! Smilie Thank you so much kahuna
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL: How do i print an associative matrix?

Hello guys, I have in PERL an associative 2-dimensional array, called matrix. The array (actually the matrix) is made up like this matrix = x; matrix = y; matrix = w; matrix = z; ... but the names a, b, c, d are set just at runtime. The question is: how can i get all the keys of... (2 Replies)
Discussion started by: foo.bar
2 Replies

2. Shell Programming and Scripting

Perl- matrix problem

A C G T - A 5 -4 -4 -4 -5 C -4 5 -4 -4 -5 G -4 -4 5 -4 -5 T -4 -4 -4 5 -5 - -5 -5 -5 -5 0 So lets say I have a matrix which looks something like (above). Its basically a scoring matrix. the numbers are... (2 Replies)
Discussion started by: aj05
2 Replies

3. Shell Programming and Scripting

diagonal matrix to square matrix

Hello, all! I am struggling with a short script to read a diagonal matrix for later retrieval. 1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098 1.000 0.111 0.412 0.115 0.058 0.091 0.190 0.045 0.058 1.000 0.205 0.542 0.335 0.054 0.117 0.203 0.125 1.000 0.587 0.159 0.357... (11 Replies)
Discussion started by: yifangt
11 Replies

4. Shell Programming and Scripting

Invert Matrix of Data - Perl

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)
Discussion started by: dinjo_jo
8 Replies

5. Shell Programming and Scripting

3 column .csv --> correlation matrix; awk, perl?

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)
Discussion started by: R3353
6 Replies

6. Programming

Matrix addition - Perl - PDL

Hi All, I have a question. I need to add 3 matrices of size 2000 x 2000. (i.e) 2000 rows and 2000 columns using Perl::PDL module. I used the following perl script #!/usr/bin/perl -w use strict; use warnings; use PDL; use PDL::Matrix; if ( @ARGV != 3 ) { die 'Two matrix files are... (1 Reply)
Discussion started by: Fredrick
1 Replies

7. Shell Programming and Scripting

Perl- creating a matrix from a 3 column file

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... (2 Replies)
Discussion started by: gabrysfe
2 Replies

8. Shell Programming and Scripting

Randomization a matrix - perl / Shell

Hello all, I have a tricky question! (at least for me it is!). I'll try to explain it carefully here. Hope you can help me solving the whole or even parts of it! Here it is: I have a big input 0\1 table as a very simplified one is shown below: (The last row and column are the sum and... (0 Replies)
Discussion started by: @man
0 Replies

9. Shell Programming and Scripting

Make Separated files from a single matrix - Perl

Hey Masters, Here is my input: fragmentID chromosome start end HEL25E TRIP1 r5GATC2L00037 chr2L 5301 6026 0.03 0.036 r5GATC2L00038 chr2L 6023 6882 -0.025 -0.041 r5GATC2L00040 chr2R 6921 7695 -0.031 0.005 r5GATC2L00042 chr2R 7715 8554 -0.006 -0.024 r5GATC2L00043 chr3L 8551 8798 0.042 0... (4 Replies)
Discussion started by: @man
4 Replies
NOWEB(1)						      General Commands Manual							  NOWEB(1)

NAME
noweb - a simple literate-programming tool SYNOPSIS
noweb [-t] [-o] [-Lformat] [-markup parser] [file] ... DESCRIPTION
Noweb is a literate-programming tool like FunnelWEB or nuweb, only simpler. A noweb file contains program source code interleaved with documentation. When noweb is invoked, it writes the program source code to the output files mentioned in the noweb file, and it writes a TeX file for typeset documentation. The noweb(1) command is for people who don't like reading man pages or who are switching from nuweb. To get the most out of noweb, use notangle(1) and noweave(1) instead. FORMAT OF NOWEB FILES
A noweb file is a sequence of chunks, which may appear in any order. A chunk may contain code or documentation. Documentation chunks begin with a line that starts with an at sign (@) followed by a space or newline. They have no names. Code chunks begin with <<chunk name>>= on a line by itself. The double left angle bracket (<<) must be in the first column. Chunks are terminated by the beginning of another chunk, or by end of file. If the first line in the file does not mark the beginning of a chunk, it is assumed to be the first line of a documentation chunk. Documentation chunks contain text that is copied verbatim to the TeX file (except for quoted code). noweb works with LaTeX; the first doc- umentation chunk must contain a LaTeX documentclass command, it must contain usepackage{noweb} in the preamble, and finally it must also contain a LaTeX egin{document} command. Code chunks contain program source code and references to other code chunks. Several code chunks may have the same name; noweb concate- nates their definitions to produce a single chunk, just as other literate-programming tools do. noweb looks for chunks that are defined but not used in the source file. If the name of such a chunk contains no spaces, the chunk is an ``output file;'' noweb expands it and writes the result onto the file of the same name. A code-chunk definition is like a macro definition; it contains references to other chunks, which are themselves expanded, and so on. noweb's output is readable; it preserves the indentation of expanded chunks with respect to the chunks in which they appear. If a star (*) is appended to the name of an output file, noweb includes line-number information as specified by the -Lformat option (or for C if no -Lformat option is given). The name itself may not contain shell metacharacters. Code may be quoted within documentation chunks by placing double square brackets ([[...]]) around it. These double square brackets are used to give the code special typographic treatment in the TeX file. If quoted code ends with three or more square brackets, noweb chooses the rightmost pair, so that, for example, [[a[i]]] is parsed correctly. In code, noweb treats unpaired double left or right angle brackets as literal << and >>. To force any such brackets, even paired brackets or brackets in documentation, to be treated as literal, use a preceding at sign (e.g. @<<). OPTIONS
-t Suppress generation of a TeX file. -o Suppress generation of output files. -Lformat Use format to format line-number information for starred output files. (If the option is omitted, a format suitable for C is used.) format is as defined by notangle(1); -markup parser Use parser to parse the input file. Enables use of noweb tools on files in other formats; for example, the numarkup parser under- stands nuweb(1) format. See nowebfilters(7) for more information. For experts only. BUGS
Ignoring unused chunks whose names contain spaces sometimes causes problems, especially in the case when a chunk has multiple definitions and one is misspelled; the misspelled definition will be silently ignored. noroots(1) can be used as a sanity checker to catch this sort of mistake. noweb is intended for users who don't want the power or the complexity of command-line options. More sophisticated users should avoid noweb and use noweave and notangle instead. If the design were better, we could all use the same commands. noweb requires the new version of awk. DEC nawk has a bug in that that causes problems with braces in TeX output. GNU gawk is reported to work. The default LaTeX pagestyles don't set the width of the boxes containing headers and footers. Since noweb code paragraphs are extra wide, this LaTeX bug sometimes results in extra-wide headers and footers. The remedy is to redefine the relevant ps@* commands; ps@noweb in noweb.sty can be used as an example. SEE ALSO
notangle(1), noweave(1), noroots(1), nountangle(1), nowebstyle(7), nowebfilters(7), nuweb2noweb(1) Norman Ramsey, Literate programming simplified, IEEE Software 11(5):97-105, September 1994. VERSION
This man page is from noweb version 2.11b. AUTHOR
Norman Ramsey, Harvard University. Internet address nr@eecs.harvard.edu. Noweb home page at http://www.eecs.harvard.edu/~nr/noweb. local 3/28/2001 NOWEB(1)
All times are GMT -4. The time now is 08:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy