How is "quartely" defined in the function retime?

조회 수: 6 (최근 30일)
Fabrice Lambert
Fabrice Lambert 2020년 5월 29일
댓글: Fabrice Lambert 2020년 5월 30일
Hi. I am using retime to get quarterly mean data from irregularly distributed measurements:
yTT = retime(xTT,'quarterly',@nanmean);
My first measurement is on the 1st of April. The new yTT timetable has now timesteps at April, July, September, and January. My question is now are these quarterly values means of the widely used Mar-Apr-May, Jun-Jul-Aug, Sep-Oct-Nov, and Dec-Jan-Feb? Or is the April quarterly value an average of Apr-May-Jun, and so on?

채택된 답변

Adam Danz
Adam Danz 2020년 5월 29일
According to Wiki,
  • First quarter, Q1: 1 January – 31 March (90 days or 91 days in leap years)
  • Second quarter, Q2: 1 April – 30 June (91 days)
  • Third quarter, Q3: 1 July – 30 September (92 days)
  • Fourth quarter, Q4: 1 October – 31 December (92 days)
While in the Chinese calendar, the quarters are traditionally associated with the 4 seasons of the year:
The months you see are the first month within the quarter.
  댓글 수: 5
Adam Danz
Adam Danz 2020년 5월 30일
편집: Adam Danz 2020년 5월 30일
You're exactly right. That section of the code shifts the starting time of the timetable to the nearest quarter and then increments by 3-months from there.
I also agree that the documentation could be clearer. If you go to the retime() and synchronize() documentation pages online and scroll to the bottom, you can give those pages a star rating and then a window will appear allowing you to give feedback. I'll make this suggestion on both pages (you could, too, if you'd like).
Fabrice Lambert
Fabrice Lambert 2020년 5월 30일
will do

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by