HOW TO IMPORT SPECIFIC DATA FROM A TEXT FILE
Show older comments
Hi, I have a text file like this:
*HEADER
....
*PRELOAD
1 12
2 45
3 65
4 ...
*VALUES
1 85
2 96
3 ...
and I want to create arrays such as:
preload = [12 45 65 ...] , values = [85 96 ...],... .
I tried many functions such as dlmread, fscanf, importdata etc. but I couldn't find a way to make matlab find the titles ('*HEADER', '*...') and store the values after them. Could anyone help me? Thanks
Accepted Answer
More Answers (0)
Categories
Find more on String Parsing 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!