- Convert x to duration array
- Build a timetable with x and y
- Use retime with timestep set to 0.010269
How to create a new data set, from an existing data set, with a different time increment than the original
3 ビュー (過去 30 日間)
古いコメントを表示
Suppose you have a very large x, y data set where "x" is time and "y" is some known value. The time increment for "x" is 0.02 seconds. "y" is known at every 0.02 seconds. I would like to change the time increment to 0.010269 seconds and use the known "y" values to find the new "y" values for the 0.010269 increment based off of a linear interpolation between the known original "y" values.
0 件のコメント
採用された回答
jonas
2018 年 8 月 22 日
編集済み: jonas
2018 年 8 月 22 日
Provide data if you want code.
As a sidenote: based on the very specific timestep I'm guessing you want to align this time-series with another time-series. If that is the case, then simply use the duration array of the other time-series as input to retime.
7 件のコメント
jonas
2018 年 8 月 22 日
You're welcome! Duration (format), datetime (format) and timetables are extremely convenient when working with time-series.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!