MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > How to average column values to the same minute? 

Subject: How to average column values to the same minute? From: Li Date: 2 Jun, 2010 19:44:04 Message: 1 of 10 
I have a large matrix like below: 
Subject: How to average column values to the same minute? From: TideMan Date: 2 Jun, 2010 20:16:20 Message: 2 of 10 
On Jun 3, 7:44 am, "Li " <liqingji...@gmail.com> wrote: 
Subject: How to average column values to the same minute? From: Li Date: 2 Jun, 2010 20:24:22 Message: 3 of 10 
Thank you for the reply. 
Subject: How to average column values to the same minute? From: TideMan Date: 2 Jun, 2010 20:43:10 Message: 4 of 10 
On Jun 3, 8:24 am, "Li " <liqingji...@gmail.com> wrote: 
Subject: How to average column values to the same minute? From: Li Date: 2 Jun, 2010 20:56:04 Message: 5 of 10 
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. 
Subject: How to average column values to the same minute? From: Bruno Luong Date: 2 Jun, 2010 21:19:07 Message: 6 of 10 
A=[2010 5 20 9 30 05 396; 
Subject: How to average column values to the same minute? From: Li Date: 2 Jun, 2010 21:19:07 Message: 7 of 10 
I found the solution: B = grpstats(A, A(:,1:5)); 
Subject: How to average column values to the same minute? From: TideMan Date: 2 Jun, 2010 21:46:12 Message: 8 of 10 
On Jun 3, 8:56 am, "Li " <liqingji...@gmail.com> wrote: 
Subject: How to average column values to the same minute? From: Roger Stafford Date: 2 Jun, 2010 22:46:04 Message: 9 of 10 
"Li " <liqingjiang@gmail.com> wrote in message <hu6ca4$6p$1@fred.mathworks.com>... 
Subject: How to average column values to the same minute? From: Li Date: 3 Jun, 2010 01:42:04 Message: 10 of 10 
Thank you all for the responses. I am glad to see the many methods. 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.