Sponsored Content
Full Discussion: Matrix with Percentage
Top Forums Shell Programming and Scripting Matrix with Percentage Post 302976121 by Don Cragun on Friday 24th of June 2016 04:39:59 AM
Old 06-24-2016
My code is working perfectly for the criteria you gave. I have repeatedly asked you to clearly state the criteria that specifies when field 1 is similar to field 2. You have repeatedly ignored that request. I clearly stated the assumptions I used to determine when my code would consider field 1 similar to field 2. Saying that my code produces the wrong results without clearly explaining what rules need to be followed to get the answer that you will consider correct doesn't tell us what we have to do to satisfy you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk percentage

how would you calculate percentage by per line? Given a column of 16 lines, grab each line and divide it by the sum of the entire column and multiply by 100? thanks ... (8 Replies)
Discussion started by: rockiefx
8 Replies

2. UNIX for Dummies Questions & Answers

percentage

How to calculate percentage of two values in unix. (5 Replies)
Discussion started by: venkatesht
5 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. Ubuntu

How to convert full data matrix to linearised left data matrix?

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

5. Shell Programming and Scripting

awk? adjacency matrix to adjacency list / correlation matrix to list

Hi everyone I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Discussion started by: stonemonkey
5 Replies

6. Shell Programming and Scripting

Percentage calculation

i am trying to get percentage : but not able to do it: i tried : x=1 y=2 z=`expr $x/$y*100` it is not giving me result can u pls help on this (4 Replies)
Discussion started by: Aditya.Gurgaon
4 Replies

7. Shell Programming and Scripting

Percentage of occurence

Dear all, I have data like below and i need to add coloumn before the COUNT field to see the Percentage out of all COUNT field value for respective raw. ============================================= COUNT CODE sConnType tConnType... (6 Replies)
Discussion started by: Iroshan
6 Replies

8. Shell Programming and Scripting

Need to monitor OS in percentage

Hi, I am looking for generic commands / scripts that could run across platforms especially on HP Itanium boxes to give me % of free OS parameters For eg: Free Total Memory RAM : 20 % Free Total Swap Memory: 35% Free Total CPU utilisation: 44% Free Disk Space: /appl = 55%... (5 Replies)
Discussion started by: mohtashims
5 Replies

9. Shell Programming and Scripting

Calculate percentage of columns greater than certain value in a matrix using awk

This matrix represents correlation values. Is it possible to calculate the percentage of columns (a1, a2, a3) that have a value >= |0.5| and report the percentage that has positive correlation >0.5 and negative correlation <-0.5 separately. thanx in advance! input name a1 a2 a3... (5 Replies)
Discussion started by: quincyjones
5 Replies

10. Shell Programming and Scripting

Percentage calculation

Hi, I have a text file in below format. I trying to find a solution for finding percentage used for each of the NAMEs. Directory ALLOCATED USED NAME1 93MB 93KB NAME2 25G 62K NAME3 14G 873M NAME4 25G 62K NAME5 20G... (10 Replies)
Discussion started by: ctrld
10 Replies
Dpkg::Index(3)							   libdpkg-perl 						    Dpkg::Index(3)

NAME
Dpkg::Index - generic index of control information DESCRIPTION
This object represent a set of Dpkg::Control objects. FUNCTIONS
my $index = Dpkg::Index->new(%opts) Creates a new empty index. See set_options() for more details. $index->set_options(%opts) The "type" option is checked first to define default values for other options. Here are the relevant options: "get_key_func" is a function returning a key for the item passed in parameters. The index can only contain one item with a given key. The function used depend on the type: for CTRL_INFO_PKG, CTRL_INDEX_SRC, CTRL_INDEX_PKG and CTRL_PKG_DEB it's simply the Package field; for CTRL_PKG_SRC and CTRL_INFO_SRC, it's the Source field; for CTRL_CHANGELOG it's the Source and the Version fields (concatenated with an intermediary "_"); for CTRL_FILE_CHANGES it's the Source, Version and Architecture fields (concatenated with "_"); for CTRL_FILE_VENDOR it's the Vendor field; for CTRL_FILE_STATUS it's the Package and Architecture fields (concatenated with "_"). Otherwise it's the Package field by default. $index->get_type() Returns the type of control information stored. See the type parameter set during new(). $index->add($item, [$key]) Add a new item in the index. If the $key parameter is omitted, the key will be generated with the get_key_func function (see set_options() for details). $index->load($file) Reads the file and creates all items parsed. Returns the number of items parsed. Handles compressed files transparently based on their extensions. $index->parse($fh, $desc) Reads the filehandle and creates all items parsed. Returns the number of items parsed. $index->save($file) Writes the content of the index in a file. Auto-compresses files based on their extensions. my $item = $index->new_item() Creates a new item. Mainly useful for derived objects that would want to override this method to return something else than a Dpkg::Control object. my $item = $index->get_by_key($key) Returns the item identified by $key or undef. my @keys = $index->get_keys(%criteria) Returns the keys of items that matches all the criteria. The key of the %criteria hash is a field name and the value is either a regexp that needs to match the field value, or a reference to a function that must return true and that receives the field value as single parameter, or a scalar that must be equal to the field value. my @items = $index->get(%criteria) Returns all the items that matches all the criteria. $index->remove_by_key($key) Remove the item identified by the given key. my @items = $index->remove(%criteria) Returns and removes all the items that matches all the criteria. $index->merge($other_index, %opts) Merge the entries of the other index. While merging, the keys of the merged index are used, they are not re-computed (unless you have set the options "keep_keys" to "0"). It's your responsibility to ensure that they have been computed with the same function. $index->sort(&sortfunc) Sort the index with the given sort function. If no function is given, an alphabetic sort is done based on the keys. The sort function receives the items themselves as parameters and not the keys. my $str = $index->output() "$index" Get a string representation of the index. The Dpkg::Control objects are output in the order which they have been read or added except if the order hae been changed with sort(). $index->output($fh) Print the string representation of the index to a filehandle. AUTHOR
Raphael Hertzog <hertzog@debian.org>. 1.16.0.3 2012-04-17 Dpkg::Index(3)
All times are GMT -4. The time now is 05:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy