how to lag timetable to the nearest day
2 ビュー (過去 30 日間)
古いコメントを表示
i have this timetable how can i lag this timetable to the nearest day(the present day is '01-Mar-2018' and the nearest day is '06-Mar-2018')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193728/image.png)
1 件のコメント
Kevin Chng
2018 年 11 月 1 日
What do you mean lag here? All the date replaced by the next nearest date?
回答 (1 件)
Peter Perkins
2018 年 11 月 6 日
"Lag" means different things to different people.
You might mean, "round the row times to the nearest whole day." Just apply dateshift to the row times.
You might mean, "interpolate the data at whole days." Use retime.
"Lag" usually means, "shift the data down one observation, keeping the same row times." The lag function does that, but I don't think that's what you want.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!