How to generate a square wave from arbitrary binary numbers?

The question is:" generate 1000 random number and convert them into a 6 bit binary wave with the amplitude of 1V. The clock frequency is 100 Mhz."

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 2 月 11 日

2 投票

a=dec2bin(randi(2^6-1,1,10))
b=a'
c=str2num(b(:))
f=10^5;
T=1/f;
t=0:T:(numel(c)-1)*T;
stairs(t,c,'r','linewidth',2)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2016 年 2 月 11 日

回答済み:

2016 年 2 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by