Extend the time vector of a TimeTable

Hello,
i have a timetable which has a time vector that starts at '07-May-2021 06:00:00' and ends at '07-May-2021 18:45:00' with 5 minute steps. I am wondering, if there is a way to extend the time vector to start at '07-May-2021 05:00:00' and end at '07-May-2021 21:55:00' with the same 5 minute steps. In addition the data at the existing timestamps has to stay the same. For example the data at '07-May-2021 10:00:00' has to stay there after extension. The values at the new timestamps e.g. from 5:00:00 to 5:55:00 can be Nan or 0.
Anyone have an idea how to do it?

 Accepted Answer

Thank you for the hint towards the retime function. I was unaware of this function, however I solved my problem another way.
I created a new timetable with the desired time vector and a dummy variable, synchronized it with the target TT and deleted the dummy variable. That might not be the most elegant way, but it works for me.

More Answers (1)

Products

Tags

Community Treasure Hunt

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

Start Hunting!