Filter löschen
Filter löschen

Is there a command for/how to convert a binary number to binary vector?

4 Ansichten (letzte 30 Tage)
Hi,
I got a binary number and i want to convert it to a binary vector like;
a=101010101010101010 to [1 0 1 0 1 0 1 0 ....]

Akzeptierte Antwort

Oleg Komarov
Oleg Komarov am 3 Aug. 2012
a = '101010101010101010';
a = a - '0';

Weitere Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 3 Aug. 2012
b=num2str(a);c=b(:);
result=str2num(c)'

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by