Did you open the file with 'rt' instead of 'r' in order to account for the CRLF ?
Also note that if you use a count for textscan() then the file position will be left after the last format code is used,before the newline for that line (unless the end of format matches newline)
Best Answer