I'm just having a small issue with my code. The code reads a file, plots the data and closes. Simple right? Well, the code is over 500000+ lines long, and after 5000 points, a new line begins. I keep getting the error "Subscript indices must either be real positive integers or logicals" for when I run this. The data goes down in one straight column, with no line separation, like this:
This is what the code looks like:
fid = fopen('***.dat');
p = fscanf(fid, '%g',[1,inf])';
axis([0 5000 0 100])
Is there some obvious flaw I'm overlooking? Thanks.