I would like to create a for loop with start, pause , continue and cancel push buttons on guide.

1 visualización (últimos 30 días)
START should execute the loop -PAUSE should stop the loop-CONTINUE should resume from where left after pausing-CANCEL should terminate the loop or program
The thing is I could not connect pushbuttons with loop. how to declare variables which will be use in main function and how to call them.
for i=0:100
disp(i);
end
"PushStart" 0 1 2 3 "PushPause"------------- "PushContinue" 4 5 6 7 8---------- "PushStop"---------- terminate
  3 comentarios
Jan
Jan el 8 de Dic. de 2016
Editada: Jan el 8 de Dic. de 2016
@Atacan: How did you try it? Please post your code, even if it does not work currently, and ask a specific question. Give us a chance to assist you. E.g. there is simply no "pusbutton" in your code, so how could it be "connected"? Therefore a solution must start with the trivial: "Create a pushbutton".

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 8 de Dic. de 2016
See attached button that creates a Go/Stop situation. Press the Go button to start a counting process. Click the Step button to stop it.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by