Azzera filtri
Azzera filtri

How to fix the clear button in GUI

1 visualizzazione (ultimi 30 giorni)
Rami
Rami il 2 Dic 2021
Risposto: Cris LaPierre il 28 Dic 2021
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 Commenti
Rami
Rami il 2 Dic 2021
It worked , I appereciate your help
Rik
Rik il 2 Dic 2021
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.

Accedi per commentare.

Risposte (1)

Cris LaPierre
Cris LaPierre il 28 Dic 2021
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

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by