Choose a number from counter by key pressing

2 vues (au cours des 30 derniers jours)
Ole
Ole le 24 Mar 2018
Modifié(e) : Ole le 24 Mar 2018
I would like to have a repeating sequence in time of numbers 1 to 100.
When a key is pressed to display the current number and continue ... so on.
x = 1:100;
y = repmat(x,100)';
while 1
for i=1:length(y)
%break the loop when a key is pressed, display the number y(i) and continue to choose again
end
y(i)
end
How to do it?

Réponses (1)

Walter Roberson
Walter Roberson le 24 Mar 2018

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by