how to do running mean?
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
Hi all, 
I have a 3d matrix with a dimension of 21*41*273, for which I want to do the running mean over the third dimension (273 days) for every 4 days.
Any help would be appreciated.
댓글 수: 0
채택된 답변
  Ameer Hamza
      
      
 2020년 10월 22일
        Try something like this
M = rand(21, 41, 273);
M_new = movmean(M, [0 3], 3, 'Endpoints', 'discard');
M_new = M_new(:,:,1:4:end);
댓글 수: 5
  Ameer Hamza
      
      
 2020년 10월 25일
				Yes, It means that it takes data from the current value and the next three values.
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

