How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]
Mostra commenti meno recenti
a is char type
Risposte (2)
Bruno Luong
il 18 Dic 2020
>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
1 Commento
dmfwlansejr
il 18 Dic 2020
Subhadeep Koley
il 18 Dic 2020
Modificato: Subhadeep Koley
il 18 Dic 2020
charArray = '10101111';
newCharArray = double((charArray == '1'));
Categorie
Scopri di più su Powertrain Blockset in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!