Extracting information from file
Mostrar comentarios más antiguos
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 comentarios
per isakson
el 8 de Mzo. de 2016
Editada: per isakson
el 8 de Mzo. de 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
el 8 de Mzo. de 2016
Editada: per isakson
el 8 de Mzo. de 2016
per isakson
el 8 de Mzo. de 2016
Editada: per isakson
el 8 de Mzo. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!