Path: news.mathworks.com!not-for-mail
From: "Nix Nicholson" <linznix@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: average every 12th row of matrix
Date: Thu, 5 Nov 2009 17:19:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 4
Message-ID: <hcv1e7$3ua$1@fred.mathworks.com>
Reply-To: "Nix Nicholson" <linznix@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257441543 4042 172.30.248.37 (5 Nov 2009 17:19:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 17:19:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2078890
Xref: news.mathworks.com comp.soft-sys.matlab:582805


Hi: Beginner question - I have 7 years of some monthly data fields and I want to compute the average for each month over the 7 year period. I can do it by specifying row numbers but how could I do this so that come next year, when i have 8 years data I can just change a scaler value for year number and it will recompute a new average?
basically how do i compute a mean of every nth row, in my case every 12th.

Many thanks