MATLAB Answers

Error using internal.stats.pdist2mex

4 views (last 30 days)
Suman Maharjan
Suman Maharjan on 15 Apr 2021
Answered: Pratyush Roy on 27 Apr 2021
Hello All,
I need to run 76339x76339 array but Workspace says the array size limit is 10000. I may have to run even larger arrays in the future. Will access to supercomputer solve the issue? If not is there any way to increase the limit as needed? I am naive to MATLAB. I would appreciate all help.
Error using internal.stats.pdist2mex
Requested 76339x76339 (43.4GB) array exceeds maximum array size preference. Creation of arrays greater than this
limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for
more information.
Error in pdist2 (line 374)
D = internal.stats.pdist2mex(X',Y',dist,additionalArg,smallestLargestFlag,radius);
Error in generateDistImage (line 26)
distances = pdist2(pcaCoeffs,pcaCoeffs);

Answers (1)

Pratyush Roy
Pratyush Roy on 27 Apr 2021
Hi,
This issue could be due to RAM limitations. You can try the following workarounds:
1. Go to MATLAB > Preferences > Workspace and ensure the Maximum array size limit is set to 100%.
Then execute 'memory' command in the Command Window and send the output. Ensure that the Maximum possible array size is larger than the memory required by the data used in neural network.
2. Also, check that the Java Heap Memory is not set to a very large value because that might restrict the amount of memory available to perform computations.
Hope this helps!

Community Treasure Hunt

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

Start Hunting!