Maximum variable size allowed by the function is exceeded.

load('EEG.mat')
Error using load
Maximum variable size allowed by the function is exceeded.
I want to load my mat file, but it always report the error above. What should I do?
I tried matfile, it reported the same error.

6 件のコメント

John D'Errico
John D'Errico 2023 年 11 月 30 日
You don't say how much memory you have. You don't say how large the file is.
JJJJJ
JJJJJ 2023 年 11 月 30 日
2 variables:channel and voltage; 83902176 values
format long g
channels = 2;
values = 83902176;
bytes_per_value = 8;
needed_memory_bytes = channels * values * bytes_per_value
needed_memory_bytes =
1342434816
needed_memory_gigabytes = round(needed_memory_bytes/2^30, 1)
needed_memory_gigabytes =
1.3
That should generally be okay unless you have a system with hardly any memory (for example might cause a problem on an old 32 bit MATLAB version.)
Dyuman Joshi
Dyuman Joshi 2023 年 12 月 1 日
@Walter Roberson Could the limit on the MATLAB array size be causing this?
Walter Roberson
Walter Roberson 2023 年 12 月 1 日
I just created a 4 gigabyte variable, saved it in a -v7.3 fie, reduced my maximum array size preference and tried loading it. I got,
Error using load
Requested 1x4000000000 (3.7GB) array exceeds maximum array size preference (1.3GB). This might cause MATLAB to become unresponsive.
Related documentation
An error about "maximum variable size permitted by the function" rather than by "array size preference" or by "out of memory" usually means that somehow MATLAB thinks the data being loaded is larger than the maximum array size it can handle at all -- which is 2^48 bytes (256 terabytes) for 64 bit versions, or 2 gigabytes for 32 bit versions.
Image Analyst
Image Analyst 2023 年 12 月 1 日
@JJJJJ what does this say if you type it in the command window?
>> memory

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

回答 (0 件)

カテゴリ

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

製品

リリース

R2023b

質問済み:

2023 年 11 月 30 日

コメント済み:

2023 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by