<< NARVAL_F_RVector NARVAL NARVAL_F_RandWtRepl >>

NARVAL >> NARVAL > NARVAL_F_RandDist

NARVAL_F_RandDist

Generate a random value in respect with a given distribution.

Calling Sequence

[n]=NARVAL_F_RandDist(i,v)

Parameters

i :

vector of values.

v :

vector of their occurence probability.

n :

random value.

Description

NARVAL_F_RandDist generates a random value n in respect with a given distribution v connected to a range of values i.

Examples

i=[1 2 3 4 5];//values
v=[4 7 8 19 3];//occurrence vector
[n]=NARVAL_F_RandDist(i,v);//application of NARVAL_F_RandDist
n

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_F_RVector NARVAL NARVAL_F_RandWtRepl >>