Welcome to Dream.In.Code
Getting Help is Easy!

Join 118,923 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,947 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



MATLAB: Out of Memory

 
Reply to this topicStart new topic

MATLAB: Out of Memory, On reading in a file of data I am running out of memory

mloone01
post 16 Jun, 2008 - 02:20 AM
Post #1


New D.I.C Head

*
Joined: 9 Jun, 2008
Posts: 7

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
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/13/08 05:01AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month