How can I set up a MATLAB timer for the next day, to run a function the values within which change daily?
3 次查看(过去 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
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
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?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!