Sponsored Content
Full Discussion: Generate points for cdf
Top Forums Shell Programming and Scripting Generate points for cdf Post 302905306 by Don Cragun on Tuesday 10th of June 2014 10:18:29 PM
Old 06-10-2014
You might want to consider this alternative:
Code:
sort -n file | awk '
{	d[++c] = $0
}
END {	inc = 1 / c
	for(i = 0; i <= c; i++)
		printf("%.1f\t%.2f\n", d[i], i * inc)
}'

which produces the output:
Code:
0.0	0.00
19.2	0.14
20.7	0.29
21.0	0.43
28.3	0.57
32.5	0.71
34.3	0.86
37.6	1.00

from your sample input.

I know this isn't the output you said you wanted, but it seems to be better suited to what you're trying to do.
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

mount points

sometimes in Solaris 8 when I go to mount filesystems using either the mount command or by editing the /etc/vfstab, i get a nice little error message saying the the number of allowable mount points has been exceeded. I have read man pages until I am blue in the face and no where can I find what the... (3 Replies)
Discussion started by: manderson19
3 Replies

2. UNIX and Linux Applications

Gnuplot question: how to plot 3D points as colored points in map view?

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - points in map view (no 3D view) - color of each point should depend on its z-value. - I want to define my own color scale -... (0 Replies)
Discussion started by: karman
0 Replies

3. HP-UX

Cannot unmount mount points??

When taking a snap, I have a script that stops any active snap. When running the script, I'm getting a message that u02 and u04 are already mounted. How can I find out what process(es) is/are latching on the these mount points? Thank you for your time. (1 Reply)
Discussion started by: genzbeat
1 Replies

4. Shell Programming and Scripting

How can I get entries between two points

Hi, I am trying to write a script to get entries between two points lets say start and end points from a log file, the log file time format is as follows Start - 07/Aug/2008:18:26:43 End - 07/Aug/2008:19:36:43 I tried using the following awk command but it couldnt pick up the entries... (3 Replies)
Discussion started by: openspark
3 Replies

5. UNIX for Advanced & Expert Users

mount points

hi, I believe a mount point does not have to be a physical disk, but rather a logical one? Is this correct? if so, how can I find out if my mount points are on different physical disks? thanks (9 Replies)
Discussion started by: JamesByars
9 Replies

6. Post Here to Contact Site Administrators and Moderators

Points?

Has any thought been given to assigning points to threads much in the way the HP ITRC forums do? This might not be possible, just a thought. (1 Reply)
Discussion started by: candlejack
1 Replies

7. Shell Programming and Scripting

Aggregated points

Combine points of specific key (a1) based on user defined size (lets say 200 in this example). so a1 191 and 191+200 and sum of all the values (4th column) and vice versa... Thanx a bunch! a1 191 201 1 a1 201 211 2 a1 211 221 1 a1 ....... .... a2......... ........ (7 Replies)
Discussion started by: quincyjones
7 Replies

8. Red Hat

Mount Points? How?

Hi folks, I have been asked to performed the following: Add the following new moint points systemA:/avp and SystemB:/usr/sap/trans to be the new linux server ZZZ How can I add those mount points and how those mount points can become another linuz server?:wall::wall::wall: (2 Replies)
Discussion started by: 300zxmuro
2 Replies

9. Emergency UNIX and Linux Support

GNUPLOT CDF issue

Hi, I'm trying to generate a cdf graph using gnuplot's smooth cumulative function. Here is the input file 34.3 19.2 20.7 28.3 32.5 21 37.6 48.8 44.2 18.1 29.2 20.4 34.4 26.5 (2 Replies)
Discussion started by: jamie_123
2 Replies

10. UNIX for Dummies Questions & Answers

Help with decimal points

Hi All, I would like to set decimal point to 16 in the following bash script but it has syntax error at }: awk '{printf"%.16e", (a<500,a++,$1/(a*1.1212121212121229e-02))}' input.dat >output.datHow may I set it in the correct way please? Thank you very much! (6 Replies)
Discussion started by: sxiong
6 Replies
NIFTI_STATS(1)							   User Commands						    NIFTI_STATS(1)

NAME
nifti_stats - compute NIfTI statistical functions SYNOPSIS
nifti_stats [-q|-d|-1|-z] value CODE [p1 p2 p3] DESCRIPTION
nifti_stats supports several distributions (normal, uniform, logistic, chi, etc.) and calculates density or cummulative distribution func- tion (and many more). Values are printed to stdout and can be piped to other tools. value can be a single number or in the form bot:top:step. default ==> output p = Prob(statistic < val). -q ==> output is 1-p. -d ==> output is density. -1 ==> output is x such that Prob(statistic < x) = val. -z ==> output is z such that Normal cdf(z) = p(val). -h ==> output is z such that 1/2-Normal cdf(z) = p(val). Allowable CODEs: CORREL, TTEST, FTEST, ZSCORE, CHISQ, BETA, BINOM, GAMMA, POISSON, NORMAL, FTEST_NONC, CHISQ_NONC, LOGISTIC, LAPLACE, UNIFORM, TTEST_NONC, WEIBULL, CHI, INVGAUSS, EXTVAL, PVAL, LOGPVAL and LOG10PVAL Following CODE are distributional parameters, as needed. Results are written to stdout, 1 number per output line. EXAMPLE
Piping output into AFNI program 1dplot: nifti_stats -d 0:4:.001 INVGAUSS 1 3 | 1dplot -dx 0.001 -stdin SEE ALSO
libnifti(1), nifti_tool(1), nifti1_test(1). Homepage: http://niftilib.sourceforge.net AUTHOR
RW Cox - SSCC/NIMH/NIH/DHHS/USA/EARTH - March 2004 This manual page was written by Michael Hanke <michael.hanke@gmail.com>, for the Debian project (but may be used by others). nifti_stats September 2007 NIFTI_STATS(1)
All times are GMT -4. The time now is 12:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy