Binary values

How do I assign the value in Binary format to a uint8/uint16 variable ?

3 Commenti

James Tursa
James Tursa il 3 Mag 2012
Please be more specific. Give us a detailed example of sample input and desired output.
Sujan
Sujan il 4 Mag 2012
for examples, I have to set a = '10101111'.
Walter Roberson
Walter Roberson il 4 Mag 2012
uint8(bin2dec(a))

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 3 Mag 2012

0 voti

uint8(bin2dec(TheString))
or use bitset()

Richiesto:

il 3 Mag 2012

Community Treasure Hunt

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

Start Hunting!

Translated by