Delimate Table and Rewrite it
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!