VERB_code_2.3
save_picture.m
1 %% Saves file as a picture
2 %
3 % See also: save_plt
4 
5 function save_picture(axis_to_save, filename, varargin)
6 
7 output_formats = [varargin];
8 
9 if (length(filename) == 0) error('filename is empty'); end;
10 if (length(output_formats) == 0) error('output_format is empty'); end;
11 
12 for it2 = 1:length(output_formats)
13  saveas(axis_to_save, [filename, '.', output_formats{it2}(1:3)], output_formats{it2});
14 end
15 
16 return