From: Andy on 26 Apr 2010 21:48 A very straightforward question I think, I've just not been able to find a solution I fairly high frequency (~10 measurements/minute) multiparameter environmental (temperature etc) data that I need to condense. At the moment I think I would like a mean value for each parameter every minute. How should I go about doing this? Best, Andy
From: Image Analyst on 26 Apr 2010 22:23 Andy: Well you could use imresize(), imfilter(), or blockproc(). Or you could use filter() or conv() to get the running mean and just take every 10th one or so of the output array. Lots of ways to do it. Probably even more than I mentioned
From: TideMan on 26 Apr 2010 23:41 On Apr 27, 2:23 pm, "Image Analyst" <imageanal...(a)mailinator.com> wrote: > Andy: > Well you could use imresize(), imfilter(), or blockproc(). Or you could use filter() or conv() to get the running mean and just take every 10th one or so of the output array. Lots of ways to do it. Probably even more than I mentioned And here's another one that doesn't require any toolboxes: nterms=10; % No of terms in the mean nbins=fix(length(y)/nterms); % Only use full bins y1=reshape(y(1:nbins*nterms),nterms,nbins); ybar=mean(y1)';
From: Andy on 28 Apr 2010 12:11 Thanks for your replies. I don't think those methods would be quite right. As there is some irregularity in the data (instrument downtime etc) so I'd prefer a mean over a particular minute rather than a running mean Any thoughts? Cheers, Andy
From: ImageAnalyst on 28 Apr 2010 16:26
On Apr 28, 12:11 pm, "Andy " <andrew.h...(a)uea.ac.uk> wrote: > Thanks for your replies. > > I don't think those methods would be quite right. As there is some irregularity in the data (instrument downtime etc) so I'd prefer a mean over a particular minute rather than a running mean > Any thoughts? Cheers, Andy -------------------------------------------------------------- Maybe you need to use interp1() to get your data sampled on regular time period intervals, and then use one of the running mean methods. |