Good day.Is there a way to create pentad average in Matlab?. Thanks.

 채택된 답변

Yash Totla
Yash Totla 2019년 7월 9일

0 개 추천

You can calculate the 5 point moving average using the MATLAB function movmean
pentadAvg = movmean(dataArray, 5)

댓글 수: 2

MattyK
MattyK 2019년 7월 9일
Thanks I see the movmean average. But isnt it suppose to give me 5 days averages. For e.g. I am expecting 73 pentads in a year?. The movmean gives me all the 365 days still.
movmean will return the 5 day moving average
pentadAvg(3) = average(day1, day2, day3, day4, day5)
pentadAvg(4) = average(day2, day3, day4, day5, day6)
Are you expecting the following result instead
pentad(1) = average(day1, day2, day3, day4, day5)
pentad(2) = average(day6, day7, day8, day9, day10)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Language Fundamentals에 대해 자세히 알아보기

태그

질문:

2019년 7월 9일

댓글:

2019년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by