MATLAB: Out of Memory

On reading in a file of data I am running out of memory

Page 1 of 1

0 Replies - 2290 Views - Last Post: 16 June 2008 - 02:20 AM Rate Topic: -----

#1 mloone01   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 09-June 08

MATLAB: Out of Memory

Posted 16 June 2008 - 02:20 AM

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;


plot (x,y)

%Block 2:

fid=fopen('queue_sizes_high.bin', 'r');

while 1
[y,x]= fscanf(fid, '%f %f', inf);


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

Is This A Good Question/Topic? 0
  • +

Page 1 of 1