Path: news.mathworks.com!not-for-mail
From: "Li " <liqingjiang@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: How to average column values to the same minute?
Date: Wed, 2 Jun 2010 19:44:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <hu6ca4$6p$1@fred.mathworks.com>
Reply-To: "Li " <liqingjiang@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1275507844 217 172.30.248.38 (2 Jun 2010 19:44:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 2 Jun 2010 19:44:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2042635
Xref: news.mathworks.com comp.soft-sys.matlab:641592

I have a large matrix like below:

year month day hour min sec A_value
2010 5 20 9 30 05 396
2010 5 20 9 30 10 470
2010 5 20 9 30 15 490
...
...

I want to calculate the average A_value (the last column) withini a minute. Other than getting a loop and finding all rows with the same year month day hour minute and average them, is there a quicker way to do this? I know 'ismember' works for column data, do we have something like that?

Thanks.



Instead of