Stopping the code in a given time

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 日

0 投票

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:

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2020 年 1 月 5 日

回答済み:

2020 年 1 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by