array exceeds maximum array size preference
显示 更早的评论
Hi everyone,
I am trying to run a "for loop" which increase the size of a matrix each iteration.
During one of my iteration i got this error- "Error using zeros
Requested 61263x61263 (28.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit
may take a long time and cause MATLAB to become unresponsive."
In matlab prefences --> workspace I have already defined the "array size limit" to 100% and it still does not help.
Is there any solution for this prolem besides bigger memory size?
5 个评论
Yes, use smaller array sizes. Do you actually want such enourmous arrays? Or did you multiply a row and a column vector?
a=1:10;
b=a.';
size(a.*b)
Ron Bartov
2021-11-19
Rik
2021-11-19
You can't view 360 million points at once, so you could consider cutting up your task in smaller parts that actually fit in memory and return results that you can interpret. This is not enough detail for me to see how you might be able to avoid a loop.
Ron Bartov
2021-11-20
DGM
2021-11-21
You may also find that a lot of these sorts of field calculations problems in T&D coursework exhibit symmetry that you can exploit to simplify the problem.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!