Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: averaging data series
Date: Wed, 23 Jul 2008 00:32:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <g65u62$n4f$1@fred.mathworks.com>
References: <g3oq8u$c88$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216773122 23695 172.30.248.35 (23 Jul 2008 00:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Jul 2008 00:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:481124



"Ben " <bburrou2@uiuc.edu> wrote in message <g3oq8u$c88
$1@fred.mathworks.com>...
> I have a quick question.  
> 
> I have data listed in 10 minute intervals and I was
> wondering how to average it, so that the data is now in 30
> minute intervals.  The data is already in a .mat file.  I
> need to transform it into a different average.  There is
> about 10 years worth of data so I can't do it individually
> or using vector indexing.
> 
> Thanks.

  If the number of successive 10-minute entries is a multiple of three, you can 
do the following.  Let x be a column vector of the data.

 x2 = mean(reshape(x,[],3),2);

Now x2 is a column vector of one third as many 30-minute averages.

Roger Stafford