How can I set up a MATLAB timer for the next day, to run a function the values within which change daily?

조회 수: 9 (최근 30일)
I am able to set up a timer for the present day for any time after the present time, but I need to run the timer daily and the time should be a few hours before the present time (by present time, I mean the time at which the timer is being set up). If I choose a time before the present time, the 'startat' function gives an error that the time has already passed. I know that to run the timer daily at a specified time, the 'Period' should be made equal to 60*60*24 seconds.
One way to do it, I think is to be present to start the timer, before the time we want it to run daily at. But I need a better technical solution.
Thank you,
Manan.
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2020년 3월 28일
Manan - I think that you need to demonstrate with an example of what you want to accomplish. You state that you know how to run the timer daily at a specified time, so why does that not accomplish what you want? Do you want the timer to run at different times on different days (so not every 24 hours)? Or something else? Please clarify.

댓글을 달려면 로그인하십시오.

답변 (1개)

Dhananjay Kumar
Dhananjay Kumar 2020년 3월 30일
Hi Manan,
I think it should be pretty straight forward. You just need to specify the starting time and date in startat to be the time and date of the next day.
Is there anything I am not able to follow here?

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by