Mean column with step
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a column vector of n elements, i would like to calculate the mean with a step of 10 (the mean of 10th, 20th, and so on). thanks
댓글 수: 0
채택된 답변
추가 답변 (1개)
Matt J
2018년 8월 28일
편집: Matt J
2018년 8월 28일
Assuming n is a multiple of 10 (otherwise you should pad the vector), you can use SEPBLOCKFUN (Download),
out = sepblockfun(theVector,[10,1],'mean')
댓글 수: 1
Matt J
2018년 8월 28일
tiffani commented
I think this is not my aim, the output will be a simple number, which is the mean each 10th elements in the vector, with this function sepblockfun i get a vector as output
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!