Split comma seperated values inside a cell in to multiple columns
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (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 commentaire
Hari krishnan
le 11 Août 2021
Catégories
En savoir plus sur Logical 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!