Choose a number from counter by key pressing

조회 수: 1 (최근 30일)
Ole
Ole 2018년 3월 24일
편집: Ole 2018년 3월 24일
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?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 3월 24일

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by