Stopping the code in a given time

1 Ansicht (letzte 30 Tage)
Eynjinn Phyu
Eynjinn Phyu am 5 Jan. 2020
Beantwortet: Meg Noah am 5 Jan. 2020
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

Antworten (1)

Meg Noah
Meg Noah am 5 Jan. 2020
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:

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by