Delimate Table and Rewrite it
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!