Save .FIG in a specific folder

조회 수: 130 (최근 30일)
Alberto Acri
Alberto Acri 2022년 11월 23일
답변: MarKf 2022년 11월 23일
I have created a 3D figure with 'plot3'.
This figure I want to save it in the .FIG format within a specific folder.
I have tried this code but it does not give the results I am looking for:
destdirectory_FIG = 'C:\Users\Alberto\....';
FIG = ; % 3D figure created with plot3
saveas(FIG, [destdirectory_FIG '/name of FIG.fig']);

채택된 답변

MarKf
MarKf 2022년 11월 23일
Use savefig to save a Matlab .fig
savefig(FIGhandle, fullfile(destdirectory_FIG, 'name_of_FIG.fig'));
You can also use saveas, though it's maybe better suited to save other formats (together with print). Maybe then the issue is with the \directories/ (hence the fullfile above). Remember to use openfig in Matlab (also drag and drop works) or even saveas with the formattype option'm' or 'mfig' (Save the figure as a MATLAB figure file and additionally create a MATLAB file that opens the figure).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by