How do I copy a figure to the clipboard from a stand-alone application generated with the MATLAB Compiler in MATLAB R2022a?

4 次查看(过去 30 天)
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
编辑: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 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

尚未输入任何版本。

Community Treasure Hunt

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

Start Hunting!

Translated by