Distributions

Parent Previous Next

VisualSim                                                                                                                                    

Distributions

 

Function & Argument Type(s)

 

Description

 

Example

 

DoubleNumber.random

(10.0)      

Perform random(N.N) and it will generate values from DoubleNumber to 10.0. If DoubleNumber is 1.0, the generated values would be from 1.0 to 10.0 uniformly distributed.

DoubleNumber    = 0.0

MyRandomInteger = DoubleNumber.random(10.0)

  = 3.88105

gaussian

(double mean,

double standardDeviation)

Return a Gaussian random number.

a = gaussian(4.0,2.5)
7.6282997399571

gaussian

(double mean,

double standardDeviation,

int length)

Return an array of Gaussian random numbers.

a = gaussian(4.0,2.5,2)
{1.3528031571712, 4.6401656366981}

gaussian

(double mean,

double standardDeviation,

int rows, int columns)

Return a matrix of Gaussian random numbers.

a = gaussian(4.0,2.5,2,2)
[8.8046434307022, 2.1317936878688; 5.1486939964974, 1.3092092139214]

irand

(int min, int max)

Return a Uniform random number of type Integer within the range.

a = irand(10,25)
16

IntNumber.irand(10)

Perform irand(N) and it will generate values from IntNumber to N. 

a = 10.irand(15)
11

rand

(double min, double max)

Return a Uniform random number of type double within the range.

a = rand(2.5,10.0)
6.5721174889599

rand()

Return a Uniform random number between 0.0 and 1.0 of type double.

a = rand()
0.0357984665357

random

(int length)

Return an array of random numbers between 0.0 and 1.0.

a = random(2)
{0.4868673662139, 0.5148047512722}

random

(int rows, int columns)

Return a matrix of random numbers between 0.0 and 1.0.

a = random(2,2)
[0.5192320699131, 0.5767163510909; 0.6003883004681, 0.187762640789]

seed

(int seed)

Return Type: None

Set random seed for random distributions. Set in parameter at the top-level using any parameter name.

Model_seed: seed(1224)

 

 

 

Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor