Can we add a variable inside the pause command?

1 Ansicht (letzte 30 Tage)
Ali
Ali am 14 Jan. 2015
Beantwortet: David Sanchez am 14 Jan. 2015
Can we add a variable inside the pause command? for example pause(wait(i))?

Akzeptierte Antwort

David Sanchez
David Sanchez am 14 Jan. 2015
If you read the documentation
doc pause
you will see that you can add a variable inside the pause command.
One example:
w = 1;
for k=1:2
pause(w) % pause one second before executing next sentence
disp(i)
end

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by