# What does this mean Requested 313121x313121 (730.5GB) array exceeds maximum array size preference.

15 views (last 30 days)
Stephen Bell on 1 Mar 2020
Answered: Roshni Garnayak on 4 Mar 2020
clear all
close all
clc
R = (Response(length(Response)/2:end)*100);
sf = 31312.1;
% time = (0:1:2000)./sf; % is 10s
t = ((0: length(R) -1) )';
df = sf./length(t);% df is 0.1
figure (1)
plot (t,R)
st = fft(R);
st = st./length(R);
st=st(1:floor(length(R)/2)+1);
st(2:end-1) = 2 * st(2:end-1);
ml = abs(st);
freq = (0:length(ml)-1).*df;
figure(2)
plot(freq, ml,'k')
xlim ([0 3000])
ylim ([0 1.8])
hold on
h = hanning(length(R));
section1 = R.*h'; %%%% This where the problem is!!
st = fft(section1);
st = st./length(section1);
st=st(1:floor(length(R)/2)+1);
st(2:end-1) = 2 * st(2:end-1);
m2 = abs(st); % Phase command
m2= m2.*2;% Amplitude Correction
freq = (0:(length(m2)-1)).*df;
figure(2)
plot(freq, m2,'r')
Image Analyst on 1 Mar 2020
It means you're going to need a bigger computer. Ask your manager/supervisor for one that can handle a terabyte of RAM! Are you sure you didn't mean
section1 = R .* h;
which would be a lot less since it just does element-by-element multiplication instead of automatic expansion to create a 313121 - by - 313121 matrix.

Roshni Garnayak on 4 Mar 2020
This issue could be due to RAM limitations. Try the following suggestions:
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.