How to Save Multiple MATLAB plots as Fig files?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
With MATLAB 2018b, one can now hover over a gridpoint with the cursor to obtain a location. This ability is only present when the plot is open in a Fig file. Mutiple values of a particular parameter are computed in each run, with each value's collection of plots saved as jpg or pdf files. Once this feature came in MATLAB 2018b, I wanted to switch to saving my files as Fig files, but the techniques I tried on the MATLAB Answers site have given me issues. I either could not save the series of fig files produced as fig files, or else I could not keep the dynamic name feature. The code for the save to JPG is posted below (Note: the filename is dynamic). I want to keep everything the same, but save fig files.
filename = strcat('Example',num2str(N),'_q_',num2str(q,'%.3f'));
if savejpg
% save as jpg
print(1,'-painters','-djpeg',strcat(filename,'r','.jpg'));
print(2,'-painters','-djpeg',strcat(filename,'b','.jpg'));
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Identification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!