S = ["[1,1]";"[2,1]";"[3,1]"]
Method 1:
M = sscanf(join(S,''),'[%f,%f]',[2,Inf]).'
Method 2:
M = cell2mat(arrayfun(@str2num,S,'uni',0))
Method 3:
M = reshape(str2double(regexp(join(S),'\d+','match')),2,[]).'
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!