out-of-memory problem

4 visualizzazioni (ultimi 30 giorni)
Emanuela Marrocu
Emanuela Marrocu il 6 Lug 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.

Risposte (2)

Jan
Jan il 6 Lug 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 il 6 Lug 2011

Categorie

Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by