保存图像而不在屏幕上显示

时间:2014-04-18 13:09:43

标签: image matlab loops plot

我想将图像保存到某个文件夹而不在屏幕上显示我。我尝试过以下代码,但它会在每次迭代时在屏幕上显示。

 clear all
 B=xlsread('data_generations1','A1','g8:g301');
 M=length(B)/2;
 for i = 2 : M   
    X=create_matrix1(B,i);
    [U E V]=svd(X);
    figure;
    h(i-1)=plot(E(:));
    title(['windows order',num2str(i),'size']);
 end
 for i = 1 : length(h)
    saveas(h(i),sprintf('figure_%d.jpg',i))    
 end

我想将它保存在某个文件夹中,让我们说带有名字数字的文件夹,那么我该怎么做呢?请帮帮我。

1 个答案:

答案 0 :(得分:2)

请参阅Figure Properties documentation

对于这种情况,我们对Visible属性感兴趣:figure('Visible','off')