How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]
Ältere Kommentare anzeigen
a is char type
Antworten (2)
Bruno Luong
am 18 Dez. 2020
>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
1 Kommentar
dmfwlansejr
am 18 Dez. 2020
Subhadeep Koley
am 18 Dez. 2020
Bearbeitet: Subhadeep Koley
am 18 Dez. 2020
charArray = '10101111';
newCharArray = double((charArray == '1'));
Kategorien
Mehr zu Powertrain Blockset finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!