I am trying to load a txt file that looks like this:
and I want to save the first line as a string to be used for the xlabel on a plot, and the n lines of numbers afterwards I would like to save as an array.
I tried to use something like this and it did not work:
xL = fscanf(fid,'%s');
for n = 1:dataLength
data(n) = fscanf(fid,'%f');
The problem was the xL variable was then defined as 'Time (s)01.51.622.53.54' . It basically did not just grab one line for some reason.