Created
April 25, 2021 12:32
-
-
Save 1ncend1ary/c3a61d32c1fcbcf1007048e95601106f to your computer and use it in GitHub Desktop.
Matlab save all figures to folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FolderName = tempdir; % Your destination folder | |
FigList = findobj(allchild(0), 'flat', 'Type', 'figure'); | |
for iFig = 1:length(FigList) | |
FigHandle = FigList(iFig); | |
FigName = num2str(get(FigHandle, 'Number')); | |
set(0, 'CurrentFigure', FigHandle); | |
savefig(fullfile(FolderName, [FigName '.fig'])); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment