Interpolating new datetime format
7 次查看(过去 30 天)
显示 更早的评论
Hi, I'm updating some code to use the new datetime format in 2014b for plotting and display purposes, but I'm struggling to interpolate my data. Previously I was using the line below where Data.Time and NewData.Time were datenum, but now I've converted them to the datetime format, I can no longer interpolate it. Is there an easy way around this?
NewData.Latitude = interp1(Data.Time,Data.Latitude,NewData.Time);
Thanks, Tom
0 个评论
采纳的回答
the cyclist
2014-10-8
I could not figure out a way to do this without (ironically) needing to convert the datetime object back to a datenum [in order to have a numeric value for interp1() to operate on].
I thought that maybe defining the time and data as a timeseries object and then using the resample command would work, but it seems that that method also requires something more datenum-y.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dates and Time 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!