MATLAB Answers

How to open a dialog box when saving multiple figures?

6 views (last 30 days)
Alon Rozen
Alon Rozen on 13 Feb 2020
Answered: Subhadeep Koley on 13 Feb 2020
Hi,
I have few figures which I want to save togethe and array 'H' of their handles.
The comand:
savefig(H,File_Name)
Will save them to 'File_Name.fig' at the GUI default directory.
Is there a way to open a dialog box to specify file name, directory and even to abort the operation?
I think I covered all 'save file' options but couldn't figure it out.
Thanks,
Alon

Answers (1)

Subhadeep Koley
Subhadeep Koley on 13 Feb 2020
Here is an example
close all; clc;
H = figure;
surf(peaks);
filter = {'*.fig'};
savefig(H, uiputfile(filter));

  0 Comments

Sign in to comment.

Products


Release

R2019a

Translated by