MATLAB: Convert each character of an array to int

char arrayconvert char to intint

I have a char array like this '10000111101010110101' and I want to convert each 0 and 1 to int and obtain [1 0 0 0 0 1 1 …]. I'd like to do it without fors, is it possible?

Best Answer

Easy peasy
x = '10000111101010110101';
y = x - '0'
Related Question