How to control GUI data from anther GUI?

1 Ansicht (letzte 30 Tage)
rupam baruah
rupam baruah am 9 Jan. 2016
Beantwortet: Walter Roberson am 10 Jan. 2016
By using GUIDE toolbox I have made two GUI in matlab. I want to control a image in an axes of GUI1 by using a slider GUI2. How is it possible? How can I pass the value of slider in GUI2 to axes of GUI2? Thanks

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Jan. 2016
If the object from the other GUI has a unique Tag then you can findobj() based on the Tag . Or in case the object has only callback visibility then findall() instead of findobj(). GUIDE allows you to change the Tag of an object.
If the object does not have a unique Tag then you need a way of finding some graphics object that belongs to the other GUI -- such as if the first GUI passed its figure number to the second GUI when it started the second GUI. If you can find some graphics object from the other GUI then you can ancestor() to find its figure. Then you can call guidata() passing in that figure identifier, which will return back the handles structure that belongs to that GUI; you can then extract the appropriate handle from that handles structure.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by