Importing .txt file into array with multiple delimiters

1 view (last 30 days)
Hello, everyone.
I'm trying to import a data file which has the structure below:
:0105D30001-000012.4+16.4-000013.0+15.23+22.45553+9.401574+0.2213876CB7354.203540102060415
:0105D30001-000012.4+16.4-000013.0+15.23+22.44921+9.401574+0.2213876CB7304.191855102060415
:0105D30001-000012.4+16.4-000013.0+15.23+22.44289+9.397939+0.2213876CB7284.192659102060415
:0105D30001-000012.4+16.4-000013.0+15.23+22.44289+9.397939+0.2213876CB7234.182006112060415
...
I'm trying to divide each row with textscan and other similar commands, but really didn't got it. The result for every row should be this:
01 05 D300 01 000012.4 16.4 000013.0 15.2 3 22.45553 9.401574 0.221387 6CB 735 4.20 354010 2 060415
01 05 D300 01 000012.4 16.4 000013.0 15.2 3 22.44921 9.401574 0.221387 6CB 730 4.19 185510 2 060415
...
This way, the result should be an array which has 18 columns. My problem is that I don't know how to separate the characters with different delimiters and other characters without delimiters.
Thanks so much for your help!

Answers (1)

Walter Roberson
Walter Roberson on 12 May 2015
There is a bunch of discussion in this recent topic

Products

Community Treasure Hunt

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

Start Hunting!