gistlib
main.mfileID = fopen('filename.txt', 'r'); fileData = textscan(fileID, '%s', 'Delimiter', '\n'); numLines = length(fileData{1}); fclose(fileID); disp(['Total number of lines: ', num2str(numLines)]); 194 chars7 lines
fileID = fopen('filename.txt', 'r'); fileData = textscan(fileID, '%s', 'Delimiter', '\n'); numLines = length(fileData{1}); fclose(fileID); disp(['Total number of lines: ', num2str(numLines)]);
gistlibby LogSnag