convert string to number array in matlab

str="123";
num = str - '0';
% num = [1 2 3];

Leave a Comment