Stopping the code in a given time

조회 수: 3 (최근 30일)
Eynjinn Phyu
Eynjinn Phyu 2020년 1월 5일
답변: Meg Noah 2020년 1월 5일
I am working on a project where I need the code to work for a certain time. The output is physical movement and I need to stop the code after the stated time in the code. How can I implement it ?
Thank you

답변 (1개)

Meg Noah
Meg Noah 2020년 1월 5일
You could create a while ... end loop for your routine where the condition evaluated involves comparing time to absolute or elapsed time.
There is a timer available in matlab the documentation explains how to implement one:

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by