MATLAB: Easiest way to skip a few lines and then read data from this text file ( x and y) to draw a plot.

MATLAB

I have attached the file I'm trying to do this for.
Thanks a lot!

Best Answer

The easiest way I can think of is to use the dlmread function:
filename = '6in_nomass_5.txt';
Data = dlmread(filename, '\t', 6, 0);
There are others, such as readmatrix that are likely even easier, however you did not state the release you are using, so dlmread is a safe option.
EDIT — To draw the plot:
figure
plot(Data(:,1), Data(:,2))
grid