out-of-memory problem

2 views (last 30 days)
Emanuela Marrocu
Emanuela Marrocu on 6 Jul 2011
I am trying to calculate a kronecker product using two matrices whose elements are all non-zero numbers a part from those in the diagonal. Each matrix is symmetric and has dimension 107*107. I get the following error message:
??? Out of memory. Type HELP MEMORY for your options.
Error in ==> kron at 47 ik = t(kb,:)+ib(:,ka);
My computer has an Intel® Core™i7 CPU @9200 @2.67GHz, 3.23 GB of RAM. Microsoft Windows XP.
Is there any option that I can use to allocate more memory to my matlab program? How can I set the memory for a more efficient use of the resources that would allow me to calculate kronecker products? Thanks for the assistance.

Answers (2)

Jan
Jan on 6 Jul 2011
The created matrix needs 1.05 GB RAM (107^4 * 8 byte per DOUBLE). Your inputs matrices are dense, because they have zeros on the diagonal only. Then storing them as SPARSE wastes memory, because this format stores the indices of each element separately. The failing line appears in the SPARSE section of KRON.
Please try to use FULL matrices instead of the SPARSE format.

Gerd
Gerd on 6 Jul 2011

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!