How to find the positions of a string which occurs multiple times
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I have a file which contains many scans,and for each scan there is the following line "par 1 f1:'Amplitude ' 1.270660e-001 3.178370e-003 0" I wish to find and extract the data contained in this line everytime it appears.
4 commentaires
Jan
le 30 Sep 2011
Why? If it is exactly this line, you can parse it once manually. Or is there any additional information?
Please explain the file format more explicitely: Is it a text file? ASCII or Unicode? Are the lines separated?
David
le 30 Sep 2011
Jan
le 30 Sep 2011
Fine. Can you post what you have done so far and explain, where the problems occurred?
David
le 30 Sep 2011
Réponses (2)
Grzegorz Knor
le 30 Sep 2011
doc fopen
doc fgetl
doc strfind
doc strcmpi
Fangjun Jiang
le 30 Sep 2011
0 votes
use textscan(), you may also need to use fopen(), fclose().
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!