remove the Text from the files
Show older comments
Hi all,
i have a big number of fileswhich contains data with this structure. Is there any easy method to remove the Text and get only the numbers. Thank you!
Text
Text Text Text
5.420 12 0.6555
5.430 0 0.6698
2.440 5 0.6236
7.450 1 0.6324
9.460 15 0.6331
Text
Text Text Text
5.420 127 0.6555
5.430 0 0.6698
2.440 5 0.6236
7.450 1 0.6324
9.460 129 0.6331
Text
.....
...
Accepted Answer
More Answers (1)
TastyPastry
on 14 Oct 2015
Edited: TastyPastry
on 14 Oct 2015
0 votes
Read in the first line, use str2num(). If the result is [], read the next line. If it's a numerical line, it should return a 1x3 vector. Store that. Continue reading in lines.
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!