How do I generate a random bipolar bitstream?

조회 수: 8 (최근 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 CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by