I am trying to monitor the memory during image acqusition, but there is no logic that I can see.
During capture I am printing this in a loop until the out of memory error occurs:
[bla blubb]=memory;
disp('__')
disp(['mem avail: ' num2str(bla.MemAvailableAllArrays / 1024 /1024/1024)])
disp(['mem matlab: ' num2str(bla.MemUsedMATLAB / 1024 /1024/1024)])
disp(['mem all array: ' num2str(bla.MemAvailableAllArrays / 1024 /1024/1024)])
disp(['mem system avail: ' num2str(blubb.SystemMemory.Available / 1024 /1024/1024)])
The first print out says:
mem avail: 15.4484
mem matlab: 3.986
mem all array: 15.4484
mem system avail: 15.4484
And the last before he error says:
mem avail: 7.8086
mem matlab: 11.6643
mem all array: 7.8086
mem system avail: 7.8086
It doesn't seem that I could use these numbers to predict when the out-of-memory error occurs?