|
I am using either of the two blocks of code below to read in a file of data and plot it in a graph. The file contains two columns of data.
Block 1: load queue_sizes_high.bin;
y=queue_sizes_high(:,1); x=queue_sizes_high(:,2);
plot (x,y)
%Block 2:
fid=fopen('queue_sizes_high.bin', 'r');
while 1 [y,x]= fscanf(fid, '%f %f', inf); end
plot(x,y);
For both occurences I get the following error: ??? Error using ==> fscanf Out of memory. Type HELP MEMORY for your options.
Error in ==> C:\MATLAB6p1\work\q_sizes\q_size_high.m On line 13 ==> [y,x]= fscanf(fid, '%f %f', inf);
I have tried using a for loop to read in 1000 lines of data but i still get the same error. Is there a way of reading in the data file row by row and plot the data immediately so the variable can be cleared again? Are there any other suggestions to help?
Thanks &Regards
|