3.5.5.5 Normal

Description

This function returns a range with npts number of values. The initial starting value in the range is determined by seed. The values are random numbers with a normal (zero mean and unit standard deviation) distribution respectively. If seed is omitted, a different seed is used each time the function is called.

Note: The seeding algorithm for Origin's methods of random number generation was changed for version 2016. For more information, see documentation for the system variable @ran.

Syntax

dataset normal(int npts[, int seed])

Parameter

npts

the number of values in the returned dataset.

seed

a positive integer used to initialize the returned pseudorandom dataset.

Return

Returns a range with npts number of values.

Example

The following script fills column 1 with 100 random numbers with a mean = 5 and a sd = 2.

col(1) = normal(100)*2+5;