Info

This question is closed. Reopen it to edit or answer.

how to load 150mb file in matlab

1 view (last 30 days)
Mohan Das
Mohan Das on 3 Feb 2012
Closed: MATLAB Answer Bot on 20 Aug 2021
I have a matlab file of 150mb in matrix form ie.(4070x4070). I need to work on this file in matlab but i couldnt load this file. it is showing "out of memory" error.Is it possible to load the data by any means .i am working on 32bit processor, ram of 2GB. Please help me, I am exhaustd by this problem.
  1 Comment
Ken Atwell
Ken Atwell on 5 Feb 2012
What form is the input file (text?). What is the MATLAB command you are using to load it?

Answers (2)

Mark Shore
Mark Shore on 3 Feb 2012
Probably not. Assuming you are using Windows, the operating system overhead, MATLAB's overhead, and storage requirements for your dataset and working copies likely exceed your available memory.
You can try closing down all other programs and unneeded services and open up a new instance of MATLAB so that no uncleared garbage is hanging around in memory. If speed of execution is not important and you have administrator privileges, you can use hard drive space to increase the virtual RAM of your system to 4 GB.
Better to add more memory, but be aware that you will come up against a 2 GB application limit for 32-bit Windows applications. Ideally (which may not be possible for you) change to a 64-bit operating system and add more RAM.
  1 Comment
Walter Roberson
Walter Roberson on 3 Feb 2012
There is also a way to increase the application limit to 3 GB on 32-bit windows.

Walter Roberson
Walter Roberson on 4 Feb 2012
Is the file currently a text file? If so, try this:
In a MATLAB session, before doing much else, load the file, and save() it to a .mat file. Then you can clear all the variables involved. At the point in the program where you need the data, load() the .mat file. This should not need much temporary storage.

This question is closed.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!