Question about fgetl function
Mostrar comentarios más antiguos
Dear all,
I'm learning to use fgetl and had followed the example that appears in the documentation:
fid = fopen('SomeFile.xxx');
tline = fgetl(fid);
while ischar(tline)
disp(tline)
tline = fgetl(fid);
end
fclose(fid);
The example works great, but I don't understand why I have to declare the tline again inside the loop.
If I don't do that it keeps looping for ever!
Can somebody explain me the reason?
Thanks,
Diego
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre ARM Cortex-A Processors 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!