Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
E K
E K le 3 Août 2012
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 ....]
  2 commentaires
Oleg Komarov
Oleg Komarov le 3 Août 2012
what class is a?
Use
whos a
E K
E K le 3 Août 2012
Modifié(e) : E K le 3 Août 2012
it is a binary string -> char

Connectez-vous pour commenter.

Réponse acceptée

Oleg Komarov
Oleg Komarov le 3 Août 2012
a = '101010101010101010';
a = a - '0';

Plus de réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 3 Août 2012
b=num2str(a);c=b(:);
result=str2num(c)'

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