Split comma seperated values inside a cell in to multiple columns
Mostrar comentarios más antiguos
I have a cell which has comma seperated values in each rows. The size of each row is different. I want to split the each value in the row to a seperate column. Any suggestion will be appreciated. A sample cell is attached.
Respuesta aceptada
Más respuestas (1)
Simpler and more efficient:
% load your data:
S = load('split_mat.mat');
C = S.split_mat;
% convert to numeric:
F = @(t)sscanf(t,'%f,',[1,Inf]);
D = cellfun(F,C,'uni',0)
1 comentario
Hari krishnan
el 11 de Ag. de 2021
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!