How do I generate a random bipolar bitstream?

11 visualizaciones (últimos 30 días)
Carmen
Carmen el 23 de Mzo. de 2011
consisting of 10bits.

Respuesta aceptada

the cyclist
the cyclist el 23 de Mzo. de 2011
I am not 100% sure I understand your question, but the following code will produce a 10-element long vector, in which each element has equal probability of being 0 or 1. Is that what you want?
x = binornd(1,0.5,[1 10])

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by