2.1.24.8.1 bernrnd


Contents

Description

Generates an array of random integers from a bernoulli distribution

Syntax

int bernrnd( int * v, uint n, double p)

Parameters

v
[output] Pointer to a int array, which contain the results
n
[input] The number of pseudo-random numbers to be generated. n>=1
p
[input] The probability of success p of the bernoulli distribution

Return

Return NE_NOERROR(0) on success, otherwise error.

Examples

Remark

See Also

Header to Include

origin.h

Reference