How can I generate random numbers between a range and how can I convert the output random number into binary number.

I want to generate random numbers between a given range. Then I need to convert those generated number into 32 bit binary values. I need some help in this regards.
Thank you.
Surajit.

 채택된 답변

ii = [1000 4000]; % range
M = randi(ii,20,1); % random numbers
out = dec2bin(M,32);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by