matlab绘图不弹出图片保存

from: http://www.ilovematlab.cn/thread-54621-1-1.html


for i=1:5
    x=0:0.1*pi:2*pi;
    y=sin(x);
    figure('visible','off')
    h=plot(x,y);
    filename=['test' num2str(i) '.jpg'];
    saveas(h,filename)
    close(gcf)
end


你可能感兴趣的:(笔记)