Query regarding matlab maximum allowed size of an array

9 次查看(过去 30 天)
I need to assign more then 16GB array for which it is showing following error. (I am assigning using x = zeros(size)):
Requested 50000x50000 (18.6GB) array exceeds maximum array size preference (6.0GB). This
might cause MATLAB to become unresponsive.
Now I found created three different array with x = zeros(28000); which is approximately 6 GB for each. Even then also on assigning third array it is giving "Out of Memory" error.
I also tried using tall array as follows. But still it is giving of out of memory error
a = tall(zeros(28000));
I checked my system memory using memory command as follows:
>> memory
Maximum possible array: 8600 MB (9.018e+09 bytes) *
Memory available for all arrays: 8600 MB (9.018e+09 bytes) *
Memory used by MATLAB: 3256 MB (3.414e+09 bytes)
Physical Memory (RAM): 6100 MB (6.396e+09 bytes)
* Limited by System Memory (physical + swap file) available.
So, Is there any way to assign and perform calculation on more than 16 GB array?
  10 个评论
yash
yash 2024-4-9
Okay, I understood I cannot have full array at a time in my memory due to memory limitation. My idea is I will read data in an in-memory array according to my available memory and rest of data I will dump in a binary file. Now, I need to extract a part of this file as and when needed from particular index. I see there are two options for doing this.
1) data store and tall arrays
2) memmapfile
So, for this application which is the best way of doing this and can you provide me one small example of doing this?
Rik
Rik 2024-4-12
You are ignoring what we're telling you. You will need to write code capable of analyzing a small part of your data. Then you can process your full file in chunks. If you need help, you need to be explicit in what data you have and what output you want.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by