Saving a figure to a specific location

82 visualizaciones (últimos 30 días)
Jonathan Moorman
Jonathan Moorman el 10 de Sept. de 2020
Comentada: Jonathan Moorman el 10 de Sept. de 2020
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!

Respuestas (1)

KSSV
KSSV el 10 de Sept. de 2020
fpath = 'C:\Users\jmoor\OneDrive\Documents\MATLAB\FigureExport';
filename = 'test' ;
saveas(gca, fullfile(fname, filename), 'jpeg');
  1 comentario
Jonathan Moorman
Jonathan Moorman el 10 de Sept. de 2020
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by