How do I generate a random bipolar bitstream?

10 ビュー (過去 30 日間)
Carmen
Carmen 2011 年 3 月 23 日
consisting of 10bits.

採用された回答

the cyclist
the cyclist 2011 年 3 月 23 日
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])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by