Hi all,
I have a data range as follow:
28
33
42
12
9
68
81
55
6
47
Since I want to create Box & Whisker Plot, I need to calculate the median, first quartile and third quartile of above data using AWK.( so far I can only writing a code for determine smallest value & largest value... (4 Replies)
Hi,
I know this question has been asked before, but I'd like to ask for some explanation rather than solution regarding finding median in unix.
I've got a simple one column file with over 2 million numbers and I need to find its median. The file looks like this:
0.123
0.235
0.890
0.000 etc... (11 Replies)
Hi All,
I have some data like below.
Step1,Param1,Param2,Param3
1,2,3,4
2,3,4,5
2,4,5,6
3,0,1,2
3,0,0,0
3,2,1,3
........
so on
Where I need to find the median(arithmetic) of each column from Param1...to..Param3 for each set of Step1 values.
(Sort each specific column, if the... (5 Replies)
Hi all,
plz help me with this, I want to to extract the duplicate rows (column 1) in a file which at least repeat 4 times. then I want to summarize them by getting the max , mean, median and min. The file is sorted by column 1, all the repeated rows appear together.
If number of elements is... (5 Replies)
I am trying to calculate the median of a column of numbers if they match an ID type on a different column. The input file has 3 columns. The column that has the ID is column 1 and the column with the values I'd like to find the median for is column 3. The file does not need to be sorted.
What I... (9 Replies)
I use the following script to print the sum and how could I extend this to print medians instead? thanks
name s1 s2 s3 s4
g1 2 8 6 5
g1 5 7 9 9
g1 6 7 8 9
g2 8 8 8 8
g2 7 7 7 7
g2 10 10 10 10
g3 3 12 1 24
g3 5 5 24 48
g3 12 3 12 12
g3 2 3 3 3
output
name s1 s2 s3 s4
g1 5 7 8 9... (5 Replies)
Discussion started by: quincyjones
5 Replies
LEARN ABOUT DEBIAN
pgasetrealinitpercent
PGASetRealInitPercent(2) PGAPack PGASetRealInitPercent(2)NAME
PGASetRealInitPercent - sets the upper and lower bounds for randomly initializing real-valued genes.
DESCRIPTION
For each gene these bounds define an interval from which the initial allele value is selected uniformly randomly. With this routine the
user specifies a median value and a percent offset for each allele.
INPUT PARAMETERS
ctx - context variable
median - an array containing the mean value of the interval
percent
- an array containing the percent offset to add and subtract to the median to define the interval
OUTPUT PARAMETERS
none
SYNOPSIS
#include "pgapack.h"
void PGASetRealInitPercent(ctx, median, percent)
PGAContext *ctx
double *median
double *percent
LOCATION
real.c
EXAMPLE
Set the initialization routines to select a value for each real-valued
gene i uniformly randomly from the interval [i-v,i+v], where $v = i/2$.
Assumes all strings are the same length.
PGAContext *ctx;
double *median, *percent;
int i, stringlen;
:
stringlen = PGAGetStringLength(ctx);
median = (double *) malloc(stringlen*sizeof(double));
percent = (double *) malloc(stringlen*sizeof(double));
for(i=0;i<stringlen;i++) {
median[i] = (double) i;
percent[i] = 0.5;
}
PGASetRealInitPercent(ctx, median, percent);
05/01/95 PGASetRealInitPercent(2)