How to a='10101111' convert array b=[1,0,1,0,1,1,1,1]
Show older comments
Answers (2)
Bruno Luong
on 18 Dec 2020
>> a='10101111'
a =
'10101111'
>> a-'0'
ans =
1 0 1 0 1 1 1 1
1 Comment
dmfwlansejr
on 18 Dec 2020
Subhadeep Koley
on 18 Dec 2020
Edited: Subhadeep Koley
on 18 Dec 2020
charArray = '10101111';
newCharArray = double((charArray == '1'));
Categories
Find more on Data Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!