MATLAB: Array of strings into 2 number array

array of strings into 2d number array

Hello, i have an array of 3 strings,each string is consists of two numbers spaced by tab. i would like to create a 2X3 2D array.i thought of going with for loop using strsplit and str2num. is there an easier way,without for loop?
Thanks

Best Answer

str = {'apple' 'boy'} ; % you may take numbers
repmat(str,2,3)