Next/continue pushbutton in gui matlab

3 Ansichten (letzte 30 Tage)
Jessie Bessel
Jessie Bessel am 24 Mär. 2020
Beantwortet: Ameer Hamza am 24 Mär. 2020
Hi, I have an simple interface with one figure and one push button. When i push the button i want to plot a graph in the figure. But after, i want to push the button again and plot another graph, and after that, another one.
What function should I use in the callback of the pushbutton to make that?
Thank you!
  3 Kommentare
Jessie Bessel
Jessie Bessel am 24 Mär. 2020
Let's say that first when i push the button, I plot sin(x). When i push again, i want to plot cos(x). When i push again I want to plot 1+x and so on...
Geoff Hayes
Geoff Hayes am 24 Mär. 2020
Denis - do you have a list of functions that you want to cycle through? How do you know what is the next function to plot?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Ameer Hamza
Ameer Hamza am 24 Mär. 2020
See the attached app to see an example of how to plot using the pushbutton callback.

Kategorien

Mehr zu Specifying Target for Graphics Output 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