Another way of saving figures in Matlab is handle them with variables and saving them later.
For example:
a=bar(...);
b=hist(...); %some figures
c=plot(...);
saveas(a, 'path\to\file\abc1.png','png');
saveas(b, 'path\to\file\abc2.png','png');
saveas(c, 'path\to\file\abc3.png','png');
Fragment from the official Matlab help:
saveas - Save figure or Simulink block diagram using specified format
Syntax
saveas(h,'filename.ext')
saveas(h,'filename','format')
Description
saveas(h,'filename.ext') saves the figure or Simulink block diagram with
the handle h to the file filename.ext. The format of the file is determined by the extension, ext. See Matlab help for more.