0

I have the following Matlab 2013b code:

subplot(2,2,1);plot(var([c1 c2],0,2)); title('var(c1,c2)');
subplot(2,2,2);plot(var([c3,c4],0,2));title('var(c3,c4)');
saveas(gcf,pth);

I would like to execute this code without opening a figure window in Matlab. Is this possible? If not, I would like the figure window to be minimized upon plotting.

blep
  • 726
  • 1
  • 11
  • 28
user915783
  • 689
  • 1
  • 9
  • 27

1 Answers1

1

If you start with a call to figure you can change the visibility:

figure('Visible','Off')

will create an invisible figure window.

The MATLAB documentation on Figure properties also includes this warning:

Changing the Visible property of a figure does not change the Visible property of its child components even though hiding the figure prevents its children from displaying.

blep
  • 726
  • 1
  • 11
  • 28