Hi,
I have a cell array of 20×1, with each cell containing information that I need to split up in 10 strings. How to I make a new array of 20×10, containing all the information?
arr = {'hello i welcome you';'what is your name';'nice to meet you'};
output = { 'hello','i','welcome','you';'what','is','your','name';'nice','to','meet','you'};
I tried the following:
for i = 1:size(arr,1) intercept = char(arr(i,:)); newarr{i,:} = strsplit(intercept,' ');end
But this just leaves me with a 20×1 cell array, containing 20 1×10 cell arrays.
Thanks guys!!
Best Answer