How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]
Afficher commentaires plus anciens
a is char type
Réponses (2)
Bruno Luong
le 18 Déc 2020
>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
1 commentaire
dmfwlansejr
le 18 Déc 2020
Subhadeep Koley
le 18 Déc 2020
Modifié(e) : Subhadeep Koley
le 18 Déc 2020
charArray = '10101111';
newCharArray = double((charArray == '1'));
Catégories
En savoir plus sur Powertrain Blockset dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!