https://www.mathworks.com/help/matlab/ref/savefig.html
savefig - Save figure as FIG-file - MATLAB
This MATLAB function saves the current figure as a FIG-file with the specified filename.
savefigurefilematlab
https://www.mathworks.com/matlabcentral/fileexchange/10889-savefig
savefig - File Exchange - MATLAB Central
Download and share free MATLAB code, including functions, models, apps, support packages and toolboxes
file exchangematlabcentral