Choose a number from counter by key pressing
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!