data = regexp(fileread(full_file_name),'\n','split');
end_of_header_line = find(contains(data,'* '));
I find the row number of the end of header part section in text file using the above codes. The end of header part section always situated in the beginning parts of the text file. Is there a way to use fileread with only the some portions of text file (for example from the first line to 50th line) insted of the whole text file?
If this is not possible, is there a way to read a few portion of text data for extracting the line number of specific string?