If x>5 for y seconds, then z
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I write this in Matlab? Thanks.
If x>5 for y seconds, then z
댓글 수: 2
Image Analyst
2022년 11월 22일
You can invest 2 hours here and learn the basics:
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
답변 (1개)
Image Analyst
2022년 11월 22일
What's wrong with tic and toc?
startTime = tic;
elapsedTime = toc(startTime);
loopCounter = 1;
while elaspedTime < 5
fprintf('Iteration %d.\n', loopCounter)
pause(0.4); % Waste some time.
elapsedTime = toc(startTime);
end
참고 항목
카테고리
Help Center 및 File Exchange에서 Naming Conventions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!