フィルターのクリア

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

4 ビュー (過去 30 日間)
E K
E K 2012 年 8 月 3 日
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 件のコメント
Oleg Komarov
Oleg Komarov 2012 年 8 月 3 日
what class is a?
Use
whos a
E K
E K 2012 年 8 月 3 日
編集済み: E K 2012 年 8 月 3 日
it is a binary string -> char

サインインしてコメントする。

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 8 月 3 日
a = '101010101010101010';
a = a - '0';

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 8 月 3 日
b=num2str(a);c=b(:);
result=str2num(c)'

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by