Creating a time without the pause function

How do I create a timer that counts down without using the pause function? It also asks the user for a positive number to countdown from and at the end it needs to display "Thank You"
disp('Welcome to the countdown timer program:');
done = false;
tic(); %start the MATLAB timer
while tic>0
time = input('Enter a time (seconds) or negative number to quit:');
time = input-1;
end
disp('Thank you');
end

Respuestas (0)

Categorías

Más información sobre Performance and Memory en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Mzo. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by