How to Save Multiple MATLAB plots as Fig files?

조회 수: 3 (최근 30일)
BM
BM 2019년 1월 14일
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개)

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by