DEIMOS
grand script

Name

grand -- generate a normal (Gaussian) random value

Purpose

Returns a normally-distributed (i.e., drawn from a Gaussian
normal distribution with mean of 0 and stddev of 1), using as
a seed either the argument provided or, if none, the time of day.

Usage

grand [seed]

Arguments

seed = INTEGER seed value for random number generator

Exit values

0 = normal completion
1 = wrong number of arguments

Example

1) Return random normal values:
punaluu{lris}180: ./grand
0.564412
punaluu{lris}181: ./grand
-0.802072
Note that the values differ because the process number (used
by default as the random generator's seed) changed.

2) Return a random value for a given seed:
punaluu{lris}183: ./grand 12345
1.08078
punaluu{lris}184: ./grand 12345
1.08078
Note that the values are the same when the same seed is used.

See Also

The shell script grand
DEIMOS script index


Go to: DEIMOS Home Page - Instruments Home Page - Keck Home Page

Last modified: Wed Jun 9 16:30:32 2004