필터 지우기
필터 지우기

How to fix the clear button in GUI

조회 수: 1 (최근 30일)
Rami
Rami 2021년 12월 2일
답변: Cris LaPierre 2021년 12월 28일
How to fix the clear button that when I click it, it does not change the axis limits back to (0-1) and keep them
(-200 - 200).
  댓글 수: 3
Rami
Rami 2021년 12월 2일
It worked , I appereciate your help
Rik
Rik 2021년 12월 2일
Since this is a GUI, you should get into the habit of specifying the target axis in your calls to xlim and ylim (and any other graphics function). It will probably not matter in this case, but if you forget it when it does matter it will be difficult to debug.

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

답변 (1개)

Cris LaPierre
Cris LaPierre 2021년 12월 28일
Following up on what Rik said, the following is how you would create the callback for Clear in app designer.
% Button pushed function: ClearButton
function ClearButtonPushed(app, event)
cla(app.UIAxes,'reset')
end

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by