필터 지우기
필터 지우기

Time series standard deviation: Defined lookback period

조회 수: 2 (최근 30일)
Christoph Meier
Christoph Meier 2015년 9월 21일
답변: Star Strider 2015년 9월 22일
Dear MATLAB community,
I have monthly time series data, and would like to compute time-series standard deviations of a variable for month t, which looks at values for a defined time frame. For instance, for the last 24 observations. Thus, the standard deviation for a variable at t should be computed of the t-24 to t values of that variable.
I could not find a solution in the forum, and would be extremely grateful for any recommendations.
Optimally, it should also ignore NaNs, as my data file has quite a few missing observations, due to the nature of the data.
Thank you!
Chris
  댓글 수: 1
Jae Song
Jae Song 2015년 9월 22일
You can try to use the nanstd(t) function where t can be a time series data with the number of observations.

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

답변 (1개)

Star Strider
Star Strider 2015년 9월 22일
I have no idea what your timeseries data look like, so this is just a guess. Have you used the getsamples and std (for timeseries) functions?

카테고리

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