Using a function strncmp
Ältere Kommentare anzeigen
I have a Text file.
And I want to ignore if the first character of the line begins with #.
Also if it begins without # , I want to output.
The code I wrote is as follows .
fid=fopen('asdf1.txt', 'r');
tline=fgetl(fid);
while ischar(tline)
if strncmp(tline,'#',1);%%this part is problem.
Please tell me what to do.
Thank in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!