- 禁止图形显示并将图形保存到文件
hf1=figure(1);
set(hf1,'visible','off')
plot(...);
print(hf1,‘-dpng’,’f1’); %保存为png格式,名字为f1.png,或者保存为eps格式:print(‘-deps’,’f1’)
hf2=figure(2);
set(hf2,'visible','off');
plot(...);
print(hf2,‘-dpng’,’f1’); %保存为png格式,名字为f1.png,或者保存为eps格式:print(‘-deps’,’f1’)
set(gcf,'visible',‘off');
plot(……);
print(gcf,'-dpng',[root_name,'Average_utilities_',common_name,'.png']);%save the figure
saveas(gca,[output_root_name,'Rate_Acc_Statistic_',num2str(epsth_kept),'.png'],'png');