MATLAB: Using FGETL to skip 2 header lines

fgetlMATLAB

How do I use FGETL to skip 2 header lines?
My data file looks like this
Row 1: ID FName LName Year Class
Row 2: ———————————
Row 3: data starts here
After I open the file with FOPEN
fid=fopen('textfile.dat','r');
How do I use FGETL to skip the 2 header lines (rows 1 & 2)?
Thanks in advance.

Best Answer

Call it twice and ignore the results.