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

2 views (last 30 days)
I would like to copy and paste a figure from a stand-alone application, but all of the usual figure menu options, like edit, view, and insert, are not available.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Below is an example on how to copy a figure from a stand-alone application:
function printexample
figure;
surf(peaks);
h = uimenu(gcf, 'Label', 'Edit');
uimenu(h, 'Label', 'Copy', 'Callback', {@localprint});
function localprint(gcbo, eventdata)
print(gcf, '-dmeta');
If you get warnings about get_param not being implemented in stand alone mode, you can safely ignore these warnings.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!