Textread format help - identifying error issue
Afficher commentaires plus anciens
Hi!
I am a grad student working with Ground-penetrating radar. I'm using a code developed by John Bradford for time-zero corrections. The code is a little dated and uses textread instead of textscan. The GPR files I am loading in are newer and are formatted differently than older versions. Matlab throws an error whenever I try to run the code on newer GPR files and I've identified the source of the error.
Older versions of the GPR file are formatted like:
"NUMBER OF TRACES = 657
NUMBER OF PTS/TRC = 3600
TIMEZERO AT POINT = 198.18 "
Newer versions are formated like without the space between line entries. If I add a space between lines in the newer file formats, the code runs perfectly. However, I have a lot of files and I don't want to edit every single one of them, so I was hoping to better understand textread.
The line that is error prone :
[value,hdr]=textread([name '.hd'],'%21c%f%*[^\n]',7,'headerlines',5)
. Can someone help me understand how '%21c%f%*[^\n]' works to identify text in the file?
Thanks!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Text Data Preparation 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!