MATLAB: Out of memory using mldivide \

\linear equationmldivideout of memoryram

Hello,
I am trying to solve a over-determined set of equations A*x = b using mldivide function as x = A\b; I am getting out of memory error!! Following is the description of the matrices: A = 19000000 x 4900 but sparse consuming 750MB of space. (have to store two of such matrix) b = 19000000 x 1 but sparse 32 bytes.
I tried this on a system with 16 GB of RAM. It went out of memory. On typing
>>help memory
for 64 bit version MATLAB 2013a (I am using for windows) it shows:
Max. possible array = 4577MB
Memory available for all arrays = 4577MB
Memory used by MATLAB = 330MB
Physical Memory(RAM) = 3327 MB
I believe that there is internal restriction for MATLAB to use memory but I don't know how to go about it?
I tried this problem on a computer with 64GB of memory too and still it goes out of memory!!
Please help!!
Thanks in advance.
Puneet

Best Answer

It doesn't look like you have as much RAM as you say you do. In the output of the memory command that you posted, it says you have only 3.3GB RAM, not 16GB. Maybe you are running under 32-bit Windows?
Nevertheless, if the problem is well-conditioned, you can try solving it using the normal equations
x=full(A.'*A)\(A.'*b)