Problem using retime for timetables
Show older comments
Hello,
i have a timetable of measured data with rowtimes every minute and i need to increase the resolution to seconds using linear interpolation. I use retime for that. The problem is,some points of the real data are not include in the interpolation. Why is this happening and how could i solve this problem? I attacht the real data below. Thanks a lot.


4 Comments
Jiri Hajek
on 16 Jan 2023
Hi, you forgot to show us how you use the retime function on your data. It has several options which could explain the observed behaviour.
Daniel
on 16 Jan 2023
Jiri Hajek
on 16 Jan 2023
OK, this is sufficient to explain the observed behaviour. Your retiming scheme uses a regular timestep, which is generated first, then the function finds appropriate values for the new times by linear interpolation. The times of points on the interpolated data explain this nicely:

Now, this is not a problem per se, it could be quite acceptable for many purposes. If you see this behaviour as a problem, then you need to define how it should be done - and only then look for a way to achieve the desired behaviour. The retime function has several options, so perhaps the first step would be to test them to see, which would suit you best.
Daniel
on 16 Jan 2023
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!