Sponsored Content
Full Discussion: awk to median
Top Forums Shell Programming and Scripting awk to median Post 302280569 by riderman on Tuesday 27th of January 2009 09:06:14 AM
Old 01-27-2009
i use awk
that's the good link for median.
in fact, i want the median of each set of 128 lines
your script does that?

Last edited by riderman; 01-27-2009 at 10:14 AM..
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Calculate the Median, first quartile and third quartile using AWK

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)
Discussion started by: nica
4 Replies

2. UNIX for Dummies Questions & Answers

Help with Median

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)
Discussion started by: zajtat
11 Replies

3. Shell Programming and Scripting

Compute the median of a set of numbers with AWK?

Is there a way in awk to compute the median of a set of numbers in a file in the following format. 34 67 78 100 23 45 67 (3 Replies)
Discussion started by: Lucky Ali
3 Replies

4. Shell Programming and Scripting

Awk based script to find the median of all individual columns in a data file

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)
Discussion started by: ks_reddy
5 Replies

5. Shell Programming and Scripting

Median and max of duplicate rows

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)
Discussion started by: ritakadm
5 Replies

6. UNIX for Dummies Questions & Answers

Median calculator based on id match

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)
Discussion started by: verse123
9 Replies

7. Shell Programming and Scripting

How to print median values of matrix -awk?

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
GPIV_ERRVEC(1)						      General Commands Manual						    GPIV_ERRVEC(1)

NAME
gpiv_errvec - Searches erroneous vectors in a PIV data file and substitutes with new values. SYNOPSIS
gpiv_errvec [-a] [-b ] [-g][-h] [-h | --help] [-i | --image_type S] [-n N] [--no_b ] [-p | --print] [-r N] [-s N] [-t F] [-u | --surround] [-v | --version] [filename] < stdin > stdout DESCRIPTION
gpiv_errvec searches erroneous outliers in a PIV data stream and substitutes with new values, if possible, i.e. if (the majority) of its surroundings are non-erroneous. Evaluation of erroneous vectors is done by looking up the Signal to Noise Ratio (SNR) value in the PIV data file or by calculating the median residu of the vector with its surroundings. A new displacement is obtained by the mean value of the surrounding values or by the location of the next higher peak in the covariance function. PIV data validation is not needed anymore while this is now done during image interrogation with gpiv_rr. Though using gpiv_errvec will not harm. The configuration parameters (containing the VALID key) may be overruled by the command line options, as explained below. Options -a Automatic threshold; calculates threshold value from residu histogram. -b Calculate statistics of the median residues and print a histogram of N bins. -g Graphical visualization of residu statistics with gnuplot (needs filename). -b is not required as this option will be set automati- cally. -h | --help On-line help. -i | --image_type S Image type or format to be used if particle displacements will have to be re-estimated at the next highest correlation peak. S may be png, tif, gif, bmp, pgm, r or gpi. Default: png. -n N Defines number of histogram of bins N for -b or -a --no_b N suppresses printing median residu histogram -p | --print Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of file- name.par, in case filename is used. -r N Erroneous vector determined by SNR of the correlation function (N = 0), median residu (N = 1) or normalized median (N = 2), i.e. the ratio between median residu with current datapoint included and between median residu of surroundigs (with datapoint excluded). -s N Substitution of the erroneous vectors by (N = 0) nothing, the local mean from the surrounding values (N = 1), median (N = 2) or next highest covariance peak (N = 3, needs filename). -t F Threshold value F of SNR or median residu to determine validity of particle displacement. -u | --surround Odd number representing the surrounding grid points to be used for local mean and median values. -v | --version Print version information on standard output, then exit successfully. filename Full name of PIV data file for input. Substitutes stdin and stdout. Output will be written to filename.erv.piv. The parameters will be written or appended to filename.par and may be used for future use by including them in ./gpivrc. If particle displacements will have to be re-estimated at the next highest correlation peak, filename is required. SEE ALSO
gpivtools AUTHOR
Gerber Van der Graaf BUGS
The program has been tested for artificial generated DPIV images. So far, no serious bugs have been found. 23 May 2005 GPIV_ERRVEC(1)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy