function clusterreq(nel),
%CLUSTERREQ - display memory requisites for cluster
%
%   Usage:
%      clusterreq(nel)

elements=[120000;440000;1700000;5000000];
memory  =[6898;8825;17130;45013];


%from elements,memory, figure out the entire memory needed for nel elements.
fittedmodel=fit(elements,memory,'linearinterp');
mem=fittedmodel(nel)

%display memory requisites for several cluster ring sizes: 

disp('Cluster size, Memory per CPU');

for i=1:5:256,
	disp(sprintf('%i        %f',i,mem/i));
end
