Extracting information from file
Show older comments
I am trying to extract information from the attached file and write them into a matrix with one column each from sample name, number of cells and porosity. I have been trying textscan and sscanf, but am not sure how to search the structure of the text.
3 Comments
per isakson
on 8 Mar 2016
Edited: per isakson
on 8 Mar 2016
- Is   cutTDM400_111_111_000_000_000   a sample name?
- Does   [1;33m--- Initializing LBM Domain   indicate the beginning of a "cell" ?
- I would use fileread and regexp
Julia
on 8 Mar 2016
Edited: per isakson
on 8 Mar 2016
per isakson
on 8 Mar 2016
Edited: per isakson
on 8 Mar 2016
Now, I think I understand. The word "cells" in "Num of cells" has nothing to do with the word "cell" in "beginning of a cell is indicated".
First, I thought you wanted to count some kind of "sections" of the file. I missed "Num of cells = 32000000" when I first browsed the file.
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!