MATLAB: Delimate Table and Rewrite it

delimatetable

I have a Table. One of the colums has multiple strings seperated by comma. The table is as follows;
MODELS PROBLEMS
_______________________ ____________________________________
'Olvio L25' 'CHARGING,keypad lock,DEAD'
'Olvio L26' 'DEAD,Auto ON OFF'
'Olvio L26' 'KEYPAD'
I wish to delimate column "PROBLEMS" and save it back to another table which will have three columns, POBLEMS1, PROBLEMS2, PROBLEMS3.
The code is as follows
raw=readtable('Service.xlsx');
r=0;
raw_problem=raw.Expert_Found_Problems;
P=height(raw);
for i=1:1:P
PROBLEMS=raw_problem{i,1};
C = strsplit(PROBLEMS,',');
r=r+1
T(r,:)=table(C)
end
T=T
Error is as follows
Error using t3 (line 15)
Subscripted assignment dimension mismatch for table variable 'C'.
Excel file is also attached

Best Answer

table() applied to the results of strsplit is probably giving you a table with one variable and three rows.
You need to take special steps when the input is a vector because there is an ambiguity over whether to create a table with one row and several variables, or a table with several rows and one variable.
table(C{1},C{2},C{3}, 'VariableNames', {'Problem1', 'Problem2', 'Problem3'})