How to control GUI data from anther GUI?

조회 수: 1 (최근 30일)
rupam baruah
rupam baruah 2016년 1월 9일
답변: Walter Roberson 2016년 1월 10일
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

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 10일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by