Saving a figure to a specific location

조회 수: 66 (최근 30일)
Jonathan Moorman
Jonathan Moorman 2020년 9월 10일
댓글: Jonathan Moorman 2020년 9월 10일
Hello! I am using app designer and am trying to save a figure named app.UIAxes as a JPEG to this file location C:\Users\jmoor\OneDrive\Documents\MATLAB\FigureExport. I understand there is probably a fairly straight forward solution, but I have been struggling to create some code without any errors. Any help would be much appreciated!

답변 (1개)

KSSV
KSSV 2020년 9월 10일
fpath = 'C:\Users\jmoor\OneDrive\Documents\MATLAB\FigureExport';
filename = 'test' ;
saveas(gca, fullfile(fname, filename), 'jpeg');
  댓글 수: 1
Jonathan Moorman
Jonathan Moorman 2020년 9월 10일
I have two questions. Where do we use fpath in the code, and what if I wanted to save multiple files such as app.UIAxes, app.UIAxes2, and app.UIAxes3. Therefore, we wouldn't be able to use gca.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by