Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How to send the axes of a GUI to a figure outside the GUI

Asked by Eric on 19 Apr 2013

Hello,

I have a GUI with two axes. One displays an image, and the other displays a plot. I am trying to produce a push button for each axes that is allows the user to send the GUI axes to a new figure outside the GUI. I have looked into the copyobj(H,P) and findobj functions,

 H = findobj("GUIFigureName",'type','axes','-not','tag',legend');

This gives me an error "Index exceeds matrix dimensions"... Error in SpecMap>SpecMap_OpeningFcn (line 137) handles.P = varargin{1};

Is there anyway to send my GUI axes to a new figure?

Thank You very much, -Eric

0 Comments

Eric

Products

No products are associated with this question.

1 Answer

Answer by per isakson on 20 Apr 2013
Edited by per isakson on 20 Apr 2013

Either something like

    H = findobj( 'Name', 'GUIFigureName','type','axes','-not','tag','legend' );

or

    H = findobj( figure_handle, 'type','axes', '-not','tag','legend' );

.

Yes, copyobj(H,P) should be the way to do it. An alternative is a bunch of low level get and set on children of H and P, respectively.

0 Comments

per isakson

Contact us