Interpolate to monthly time series

조회 수: 6 (최근 30일)
Sarah Yun
Sarah Yun 2019년 12월 27일
댓글: Walter Roberson 2019년 12월 27일
Hello,
I have a timeseries of time against temperature - smallest unit of time is hour
I want to interpolate so the month is the smallest unit of time.
How should I use this function to do this?
vq = interp1( x , v , xq )
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2019년 12월 27일
We recommend converting your timeseries to a timetable() object and then using retime()
  댓글 수: 2
Sarah Yun
Sarah Yun 2019년 12월 27일
I have done this but it removes the date column when I convert back to array.
So, I want to use the interp1 function to avoid this data loss.
Walter Roberson
Walter Roberson 2019년 12월 27일
https://www.mathworks.com/help/matlab/ref/timetable2table.html adds the times back in as a column in the table. Or you can
timeseries(YourTimeTable{:,:}, YourTimeTable.Properties.RowTimes)
to create a timeseries object.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by