Generation of a pseudo-random number sequence

Séquence d'appel

b = prbs(n)

Paramètres

n:

number of bits to generate

b:

output binary vector (1 column of n elements)

Description

Implementation based on the grand Scilab generator.

Note: So as to generate a determinist pseudo-"random" sequence, one can initialize the seed of the random generator using the following command: grand("setsd", n), with n being any integer.

Exemples

// Generation of a vector of 10 random bits
b = prbs(10)

Voir aussi