How can I use 'Text divide' function(in Excel) in Matlab??

1 vue (au cours des 30 derniers jours)
Coeing
Coeing le 6 Avr 2017
I have so many CSV files, but they formed right this(below).. That string and number are all in the one cell. Is there ways to cut this data automatically?? Please help me..T.T
[Content]
meter 1;121.6;0.6845;0.3152;;meter 1;123.0;0.6845;0.3151;meter 1;121.4;0.6844;0.3152

Réponses (1)

Star Strider
Star Strider le 6 Avr 2017
Experiment with regexp:
strc = {'meter 1;121.6;0.6845;0.3152;;meter 1;123.0;0.6845;0.3151;meter 1;121.4;0.6844;0.3152'};
parstr = regexp(strc{:}, {';',';;'}, 'split');
parstr{1}
parstr{2}
ans =
1×13 cell array
Columns 1 through 8
'meter 1' '121.6' '0.6845' '0.3152' '' 'meter 1' '123.0' '0.6845'
Columns 9 through 13
'0.3151' 'meter 1' '121.4' '0.6844' '0.3152'
ans =
1×2 cell array
'meter 1;121.6;0.6845;0.3152' 'meter 1;123.0;0.6845;0.3151;meter 1;121.…'

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by