Extracting information from file
Afficher commentaires plus anciens
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 commentaires
per isakson
le 8 Mar 2016
Modifié(e) : per isakson
le 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
le 8 Mar 2016
Modifié(e) : per isakson
le 8 Mar 2016
per isakson
le 8 Mar 2016
Modifié(e) : per isakson
le 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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur String Parsing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!