how save plot in specific folder ?
조회 수: 106 (최근 30일)
이전 댓글 표시
i uesd ( spectrogram ) to plot pic i need save this pic in specific folder i created i use ( exportgraphics ) but is save in current folder how can save with any folder whant
댓글 수: 0
채택된 답변
Jan
2021년 3월 10일
Add the wanted path to the file name:
filename = fullfile('D:\Your\Folder', 'File.jpg')
exportgraphics(obj, filename)
댓글 수: 3
Jan
2021년 3월 11일
Folder = 'D:\Your\Folder';
for k = 1:100
filename = sprintf('File%03d.jpg', k);
file = fullfile(Folder, filename);
exportgraphics(obj, file);
end
추가 답변 (1개)
Ruger28
2021년 3월 10일
In older versions of MATLAB:
filename = fullfile('D:\Your\Folder', 'File.jpg');
saveas(MyFigure,filename);
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!