Binary Generation

2 次查看(过去 30 天)
Will Wild
Will Wild 2011-3-23
Hello there
I am looking to count from 0 to 350 using a 9 bit binary number. I have a basic knowledge of Matlab and can do some simple tasks. I wandered if it was possible to use Matlab to generate the numbers. I thought this would be right up Matlab's street.
Thanks
Will

回答(1 个)

Ashish Uthama
Ashish Uthama 2011-3-23
The dec2bin function converts decimal numbers into binary equivalent strings.
d = 0:350;
disp(d);
b = dec2bin(d);
disp(b);

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by