How do I generate a random bipolar bitstream?

 Akzeptierte Antwort

the cyclist
the cyclist am 23 Mär. 2011

0 Stimmen

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])

Weitere Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Hilfe-Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by