help > high throughput RAM memory
Showing 1-1 of 1 posts
Display:
Results per page:
Feb 8, 2017  10:02 PM | Jonathan Vanhoecke - University College London
high throughput RAM memory
Dear all

I would like to generate many figures with BrainNet Viewer via a Matlab script.
However, when I run the code (similar to the simplified one below) I noticed that after couple of figures
the physical memory of the computer is entirely occupied (crash). Nonetheless, I try to save the figure,
remove all variables in order to release the memory after each figure generated.
Even if BrainNet Viewer is manually closed and all figures are closed, the occupied memory never get back to baseline,
(e.g. Matlab and essential processes ~2GB), unless Matlab is closed and started up again.
After each iteration in the for loop, the available RAM memory get more scarce

Thank you very much for your advice.

% name is a collection of .node filenames, implemented as strings in a cell array
% in the node file there are around 300 nodes assigned to 6-8 modules
% the template and the preset options are always the same (single view, modular color)
% the name of the saved figure same as filename with a different extension
% the script works perfect for j=1:3

for j=1:50
fig.name{j}=[name{j} '.jpg'];
BrainNet_MapCfg(name{j},'BrainMesh_Ch2_smoothed.nv','BrainNetViewer_option.mat',fig.name{j});
fclose all;
clearvars -except j name
end