matlab直接保存图形而不显示图形

for ii=1:10
h=figure(ii);
x=0:0.01:ii;
y=sin(x);
plot(x,y);


set(h,'visible','off');
str=sprintf('figure(%d)',ii);
saveas(h,str,'jpg');
end

    推荐阅读