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

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Daniell Algar
on 1 Feb 2013

Hi,

I have two handles created with something like,

hTri= trimesh(); hFill= fill3();

where two figures act as parent's for hTri, say hTRiP, and the parent for hFill is hFillP.

I would now and then like to display both hTri and hFill in the same figur, say hTriP.

I've tried to set the 'Parent' and 'Children' properties for hTri and hFill, to hTriP. Either I'm doing something wrong or I'm in a blind of what to do... I do not wish to re-plot the figures, just show them both sometimes in the same figure, sometimes in two separate.

Thanks for any help!

*No products are associated with this question.*

Answer by Shashank Prasanna
on 1 Feb 2013

Accepted answer

Have you tried copyobj? you can use this to reparent a copy:

Daniell Algar
on 1 Feb 2013

I didn't know about that function! I had tried to copy the handles myself without any luck.

It solved it for me, thank you very much!!

Answer by Jurgen
on 1 Feb 2013

Also, maybe figsplit and figmerge may help.

http://www.mathworks.com/matlabcentral/fileexchange/31737-splitmerge-matlab-figures

## 0 Comments