Scan a data file for data after keywords
Show older comments
Hello everyone,
I have an output file from a simulation which is not ordered in a specific way and changes depending on the simulation result.
Somewhere in the file, sections like this can be found. They are on the other hand always the same:
Seed number 1 set at time t = 5.00000E-08 s
-------------------------------------------
in the bulk, zp = 51971
Phase: 1 (BCC_A2)
Seed type: 1 (7: 3/19)
Local temperature = 1308.5 K
Undercooling = 445.98 K
Nucleus curvature undercooling = 0.99588 K
Grain number = 76
What I wanted to ask as a MATLAB beginner: How can I search for keywords like "Seed number", "t =", "zp =" and "Undercooling=" and get the values behind them and write them all in a list with 4 columns and the values which belong together in every line.
I suspect that very similar questions have already answered in this forum. However, I was not able to understand how the solutions are supposed to work. I would be very grateful for any help.
Best regards
Moritz
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion 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!