[data, pos, n] = next_log(fplog, what, info )
Get the next line of data from a log file. Log files are ASCII files with log data ordered in columns along lines. These files may contain empty lines or matlab comment lines. This function has been written for parsing log files generated by utilities _ref(scan_nbr(1)) and ref_(scan_nav(1)), and visualize them graphically within Matlab.
File pointer to log file.
A string specifying what to look for in the log file. The currently only possible value is data,which looks for lines of numerical data. Further implementations would support reading of warning or error messages.
Number of lines to read before giving information about current reading state. If it is an array like [n,nstart],the current line number is set to nstart instead of zero,and information will be output every n lines.
Array of data from next log line. The returned value depends on the parameter what. For data,it is an array from the next non-empty and non-comment line.
Position in log file.
If info is an array specifying the start line number,n is the current line number in the log file. Else it is the number of lines skipped until current line.
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999