Is there a way to linearly interpolate dates and times?
Show older comments
I am trying to interpolate discharge data using gage information. The time that corresponds to the discharge data is listed in Excel as:
1/10/08 15:33 (for example)
In MATLAB I've used the datestr command on the data and the dates are now listed as:
11-Jan-0108 15:33:42 (for example)
The data is generally given in 10 minute increments, so my question is as follows: is there a way to linearly interpolate the discharge data so it returns data for every 2 minutes, for example? I've tried using interp1 but I'm not sure exactly how to input the date so it reads properly.
Accepted Answer
More Answers (1)
the cyclist
on 3 Jul 2012
0 votes
One method would be to use the datenum() command to convert the dates to pure numbers, which can be consumed by interp1.
1 Comment
Walter Roberson
on 3 Jul 2012
"consumed" ?
Categories
Find more on Time Series Objects 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!