How to Save Multiple MATLAB plots as Fig files?
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!