how to fix the current axes in gui?

조회 수: 4 (최근 30일)
Osama Alkurdi
Osama Alkurdi 2020년 4월 2일
댓글: Osama Alkurdi 2020년 4월 4일
I have a gui contains two axes, one of them are used to plot a mechanical motion for a certain mechanisms over a period of time, and when the animation starts the plot start to apear at axes1, but if I click at axes2 the animation start to appear at it, it seems that when any axes get clicked, it becomes the current one.
the problem is that I want the animation always appear at axes1 no matter if I clicked at any other axis, but I have to mention something important that I can't use plot(handels.axes1,.....,.....) or axes(handles.axes1).
is there is a command that can off or inactice a certain axes?
like this command which could off a certain pushbutton, set(handles.pushbutton1,'enable','off').
  댓글 수: 19
Rik
Rik 2020년 4월 3일
In GUIDE generated code your callbacks will have the handles matrix available. If you decide to take the unfortunate route of doing things like calling clear at the beginning of the function you can get it back with this:
handles=guidata(gcbf);
Osama Alkurdi
Osama Alkurdi 2020년 4월 4일
@Rik
@Adam Danz
@Walter Roberson
Thank you Guys :)
I finally understand what you mean after studying your comments and searching in the web, @Rik your solution work perfectly for me, and I know how to implement it in my code.
I learned a new things in matlab, thank you again.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by