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

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

Answers (1)

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

Asked:

on 6 Apr 2017

Answered:

on 6 Apr 2017

Community Treasure Hunt

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

Start Hunting!