Binary Generation

2 vues (au cours des 30 derniers jours)
Will Wild
Will Wild le 23 Mar 2011
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

Réponses (1)

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

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by