How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]

回答 (2 件)

Bruno Luong
Bruno Luong 2020 年 12 月 18 日

3 投票

>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
Subhadeep Koley
Subhadeep Koley 2020 年 12 月 18 日
編集済み: Subhadeep Koley 2020 年 12 月 18 日

1 投票

charArray = '10101111';
newCharArray = double((charArray == '1'));

カテゴリ

ヘルプ センター および File ExchangePowertrain Blockset についてさらに検索

タグ

質問済み:

2020 年 12 月 18 日

コメント済み:

2020 年 12 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by