How do I copy a figure to the clipboard from a stand-alone application generated with the MATLAB Compiler in MATLAB R2022a?
4 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 6 月 27 日
編集済み: MathWorks Support Team
2025 年 2 月 14 日
I would like to copy and paste a figure from a stand-alone application generated from MATLAB Compiler in MATLAB R2022a, but all of the usual figure menu options like edit, view, and insert, are not available. How can I do this?
採用された回答
MathWorks Support Team
2025 年 2 月 12 日
編集済み: MathWorks Support Team
2025 年 2 月 14 日
Below is an example on how to copy a figure from a stand-alone application. This code creates a new "uimenu" object called "Edit", which will now appear on the figure's toolstrip when the compiled application is run. Then, it gives this "uimenu" object a dropdown option that you can select called "Copy". Clicking on this option will copy the figure to your clipboard.
figure;
plot(1:10, 1:10);
h = uimenu(gcf, 'Label', 'Edit');
uimenu(h, 'Label', 'Copy', 'Callback', {@localprint});
function localprint(gcbo, eventdata)
print('-clipboard','-dmeta')
end
If you get warnings about get_param not being implemented in stand alone mode, you can safely ignore these warnings.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!