Saving pdf (png) with user adding the name
1 回表示 (過去 30 日間)
古いコメントを表示
I have a GUI with a save button, and I would like to open a dialog box where the user can enter the filename and select the format of the file (pdf or png)
0 件のコメント
採用された回答
Hamoon
2015 年 9 月 10 日
You can use this code inside the Callback function of your save button:
[filename, pathname] = uiputfile({'*.pdf';'*.png';'*.*'},'Save as');
if isequal(filename,0) || isequal(pathname,0)
% user selected cancel button
else
% user selected a pathname and filename
% you can use these variables to save what you want
% in that path and by that name
end
you can also specify a path as default:
[filename, pathname] = uiputfile({'*.pdf';'*.png';'*.*'},'Save as', 'C:\untitle.png');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!