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

Answers (2)

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

Categories

Tags

Asked:

on 18 Dec 2020

Commented:

on 18 Dec 2020

Community Treasure Hunt

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

Start Hunting!