Read in the whole file at once. In this example I'm using fileread() because I'm unfamiliar with the FEX submission readfile() mentioned in your question.
C = fileread('myTextFile.txt');
Split the char array by lines into a cell array
Ca = strsplit(C,newline);
Extract text lines n to m
If you'd rather have a char array as output