Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

gauss [string] [float] float|vector

gauss is NOT undoable, NOT queryable, and NOT editable.

This command returns random numbers with one, two or three dimensional correlation in a Gaussian distribution. The float arguments to the command scale the output. The distribution is normalized. Multiple random number streams:
The three stream-based variants of gauss accept a string parameter which specifies the name of the random number stream to use when generating random numbers. The behaviour of the function is identical to the non-stream versions with the exception that random number generation is performed from the specified rather than the default random number stream. For more details on multiple random number streams please see the documentation for the rand function.

Return value

float When called with a single float argument vector Otherwise

Related

delrandstr, rand, randstate, seed, sphrand

MEL examples

gauss 1;
// Result: -0.771573 //
gauss 4.2;
// Result: 0.540686 //
gauss <<1,2>>;
// Result: <<0.0071681, 0.304371, 0>>  //
string $s1 = "stream1";
// Result: stream1 //
gauss $s1 1;
// Result: -0.771573 //
gauss $s1 4.2;
// Result: 0.540686 //
gauss $s1 <<1,2>>;
// Result: <<0.0071681, 0.304371, 0>>  //