read file with text and numericals
Show older comments
I have a file as follows
it contains 3 text lines at starting, data with 2 columns for every 3 lines which have 5 columns in each line.
How to read it in matlab?
example:
# this is line 1
# this is line 2
#this is line 3
10 25
1 14.34 25.98 576.6779 34.79080
2 78.90 45.980 345.980 4534.809
3 70.39 234.32 34.456 456.00
20 25
1 31.6626 16.4479 6.9191 55.0296
2 149.629 105.448 231.137 486.214
3 0.000261389 44.6379 271.636 316.274
30 25
1 35.3791 12.0603 6.48611 53.9255
2 146.574 111.14 248.954 506.668
3 1.1585 64.3987 348.685 414.242
I need to separate line with 2 columns and lines with 5 columns
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data 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!