From: "Li " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to average column values to the same minute?
Date: Wed, 2 Jun 2010 20:56:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <hu6gh4$e3t$>
References: <hu6ca4$6p$> <> <>
Reply-To: "Li " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1275512164 14461 (2 Jun 2010 20:56:04 GMT)
NNTP-Posting-Date: Wed, 2 Jun 2010 20:56:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2042635
Xref: comp.soft-sys.matlab:641613

Thanks, but I am afraid that it does not solve my problem. I have millions of data from 1900 all the way to 2010. The number of measurements within a minute ranging from 1 to 20. I do not think it is simply a reshape and average. What I want are the averages within each minute, instead of the average of the whole time span. 

TideMan <> wrote in message <>...
> Oh, I see.........
> I misread the headers.
> A1=reshape(A(:,6),12,[]);  % Form a 12xn matrix
> Abar=mean(A1).';   % Take the mean of each column and transpose
> Note: the no of rows in the matrix A must be a multiple of 12 or you
> must reduce it to that.