Efficiently handling extremely large matrices (N x N) in MATLAB (e.g., N = 137 million)

조회 수: 3 (최근 30일)
I'm facing challenges in handling very large matrices in MATLAB, specifically matrices with dimensions like N x N, where N can reach values on the order of 137 million. Directly creating and manipulating such matrices in MATLAB is impractical due to memory limitations.
I'm seeking guidance on effective strategies for dealing with these large matrices in MATLAB. Here are some specific questions I have:
  1. What alternative approaches can be used instead of directly creating and manipulating the entire matrix?
  2. Could you provide examples of using sparse matrices, Tall Arrays, or block processing techniques in such scenarios?
facing errors like ("Error using zeros Requested array exceeds the maximum possible variable size.) and sometimes showing required RAM for operation as 1022.1 Gb similar errors .

답변 (1개)

Matt J
Matt J 2024년 3월 6일
편집: Matt J 2024년 3월 6일
Could you provide examples of using sparse matrices
You give us wide latitude on what the example can be be, so here is one:
A=speye(137e6);
whos A
Name Size Bytes Class Attributes A 137000000x137000000 3288000008 double sparse

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by