Maximum variable size allowed by the program is exceeded.

i have this problem
how can i resolve it plz !

4 件のコメント

DGM
DGM 2024 年 8 月 23 日
Without knowing what any of these variables are, or how they were derived, there isn't much anyone can do but guess. I'm going to guess that M is somewhere around 2^32 or larger. At that point, the internally generated symbol vector would be about 17GB. You'll have to figure out why the exponent is that large.
Walter Roberson
Walter Roberson 2024 年 8 月 23 日
numberOfElements = 1.84467440737096e+19 which is 2^64 .
The largest single variable permitted by MATLAB is 2^48-1 bytes. This is because in all publicly released versions, the x64 architecture only implements 48 address pins, so it is physically impossible to address more than 2^48 bytes.
John D'Errico
John D'Errico 2024 年 8 月 25 日
編集済み: John D'Errico 2024 年 8 月 25 日
And even if you could address 2^64 memory elements, you will still have problems.
You should note that even boolean variables in MATLAB still take up 1 byte. One gigabyte is 1e9 bytes. If you want to address 2^64 bytes, then you will need
requiredGigaBytes = 2^64/1e9
requiredGigaBytes = 1.8447e+10
So roughly 2e10 gigabytes of RAM. Or 2e7 terabytes. Or 2e4 petabytes. Or 20 exabytes.
Do you realize just how large that is? A comparison from the New York Times in 2003 had this approximate estimate:
'An exabyte (one million terabytes) is so large that it is estimated that 'all words ever spoken or written by all humans that have ever lived in every language since the very beginning of mankind would fit on just 5 exabytes.'
Ever spoken, OR written. And you want to store 4 times that amount.
The point is, you need to reformulate what you are doing, COMPLETELY reformulate. While there are many small problems easily solved using a brute force approach, that same problems often grow exponentially in size. That means you will not always be able to use the same scheme that worked for a small problem on a large problem.
amani
amani 2024 年 9 月 5 日
you are right thnk you for the information

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2018b

質問済み:

2024 年 8 月 23 日

コメント済み:

2024 年 9 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by