Gistlib Logo

gistlib

write a matlab code that reads in an infinite number of lines from text file in matlab in matlab

main.m
fid = fopen('your_file.txt', 'r');

while true
    tline = fgetl(fid);
    if ~ischar(tline)
        break;
    end
    disp(tline);
end

fclose(fid);
151 chars
12 lines

similar matlab code snippets

write a matlab code that reads in an infinite number of lines from text code in matlab
save an image using imwrite in matlab
loop through all files in folder and list those which end with .m in matlab
fprintf with 2d array in matlab
list all files in folder that contain the string "abc" inside in matlab
iterate through all files in folder, open them and check if contains the string "abc" inside, then list all files that do in matlab
write a while loop that multiplies uservalue by 2 while all of the following conditions are true: uservalue is not 10 uservalue is less than 25 in matlab
load all files of a certain type in a folder in matlab
mnist file to mat in matlab
create a do-while in matlab

related categories

matlab
file-io
while-loop

gistlibby LogSnag