condition: colorbar not 50% of pictures if loop run without pauses; if put breakpoints , run step-wise, colorbars occur; think stability/memory problem
pseudocode
i=1; while (i < 3); figure('visible', 'off'); hax=axes(); image('parent',hax); % heavy computation here; see warning below it. a=rand(1,20000); b=rand(1,20000); c=rand(20000,20000); imagesc(a,b,c); colorbar(hax) %% unsuccessful attempts %drawnow % not %pause(1) % not homedir=char(java.lang.system.getproperty('user.home')); % systems filename=fullfile(home, sprintf('/desktop/%d', i)); export_fig(filename, '-png', '-q101', '-a1', '-m1', ... '-cmyk', '-nocrop', '-dpng', hax); i=i+1; end
error message after colorbars gone, indicating memory problem
warning: print2array generating 46.1m pixel image. slow , might cause memory problems.
- suever. command
drawnow
aftercolorbar
not help.
system: linux ubuntu 16.04 64 bit
matlab: 2016a
hardware: macbook air 2013-mid
this matlab's internal problem. if run short in memory, computation , graphics become unstable in components, cannot profile , understand because closed system. use real data difficult matrix computations reproduce error. extended memory swap described in thread how allocate more space swap , increase size greater ram? 8 gb 36 gb, , no errors now.
Comments
Post a Comment