Can we add a variable inside the pause command?

2 views (last 30 days)
Ali
Ali on 14 Jan 2015
Answered: David Sanchez on 14 Jan 2015
Can we add a variable inside the pause command? for example pause(wait(i))?

Accepted Answer

David Sanchez
David Sanchez on 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

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!