|
From: | Henk Borsje |
Subject: | Taking a mean of a fixed length number of points |
Date: | Fri, 29 Nov 2019 21:50:21 +0100 |
This question is not of crucial importance, but I’m curious if there is a better alternative. I need to calculate the columnar average of each k points out of an array of x(n,m) elements, resulting in a new array x_avg (floor (n/k) , m) elements. I use: tmp = reshape(x,k,[],m); (1) x_avg = reshape(mean(tmp),[],m); (2) I wonder if there is a simpler or more direct way, except for substituting equation (1) into (2) Henk Borsje Oudenbosch, Netherlands |
[Prev in Thread] | Current Thread | [Next in Thread] |