ı need a function “bit_sequence(N)” to generate random binary sequence (binary 0’s and 1’s) of N bits.?

2 ビュー (過去 30 日間)
astronot
astronot 2014 年 11 月 18 日
回答済み: the cyclist 2014 年 11 月 18 日
In this function, use a random number generator to generate numbers between 0 and 1. The function must return 0 as an output when the generated number is in the range (0, 0.5); when it is in the range (0.5, 1), the function must return 1.Generate 1.000 bits, 10.000 bits, 100.000 bits and finally 1.000.000 bits using the function but how?

回答 (1 件)

the cyclist
the cyclist 2014 年 11 月 18 日
Here is a hint. Type
docsearch random
into the Command Window.

カテゴリ

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