Trick to finding A*A^T without wasting memory?

  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Memory
Click For Summary
SUMMARY

The discussion centers on finding the eigenvalues of the product A*A^T in MATLAB without exceeding memory limits. The user, Mike, encounters memory errors due to the large size of matrix A, which is exacerbated by MATLAB's handling of matrix transposition. Solutions proposed include converting the matrix to single-precision floats using the command A=single(A) to reduce memory usage, and employing singular value decomposition (SVD) with the function svd(X), specifically utilizing the economy size option svd(X,0) to optimize memory consumption.

PREREQUISITES
  • Understanding of MATLAB matrix operations
  • Familiarity with eigenvalues and eigenvectors
  • Knowledge of singular value decomposition (SVD)
  • Experience with data types in MATLAB, specifically single vs. double precision
NEXT STEPS
  • Learn how to implement MATLAB's single-precision data type effectively
  • Explore the singular value decomposition (SVD) function in MATLAB
  • Research memory management techniques in MATLAB for large datasets
  • Investigate alternative methods for computing eigenvalues without full matrix multiplication
USEFUL FOR

Data scientists, MATLAB users, and researchers working with large matrices who need to optimize memory usage while performing linear algebra computations.

mikeph
Messages
1,229
Reaction score
18
Hi,

I have a rather large matrix A, and I need to find the eigenvalues of A*A^T. The problem is, when I type this in MATLAB I get a memory error. I am physically limited to 3GB so I'm now searching for mathematical tricks to find this without performing the full calculation.

I've successfully re-arranged similar things before which removed the memory error (I think as soon as MATLAB sees A' it creates a second matrix the exact same size as A, doubling memory use). This time I am a little stuck.

Any hints?

Thanks,
Mike
 
Physics news on Phys.org
Have you tried converting the matrix to single-precision floats? It will cut memory usage in half: A=single(A);
 
Have you tried singular value decomposition? Matlab does that with the function svd(X). It also supplies an "economy size" singular value decomposition via svd(X,0).
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 1 ·
Replies
1
Views
9K
  • · Replies 18 ·
Replies
18
Views
4K
Replies
11
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 11 ·
Replies
11
Views
34K