Answers for "string to array matlab"

0

string to array matlab

s = ['aabc'];
sc = sprintf('%c %c %c %c',s);
array = strsplit(sc, ' ')
produces:
array = 
    'a'    'a'    'b'    'c'
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language