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

1 visualización (últimos 30 días)
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 comentario
Geoff Hayes
Geoff Hayes el 28 de Mzo. de 2020
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.

Iniciar sesión para comentar.

Respuestas (1)

Dhananjay Kumar
Dhananjay Kumar el 30 de Mzo. de 2020
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?

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by