Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: mean of unique values
Date: Mon, 31 May 2010 15:40:05 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 21
Message-ID: <hu0l8l$h9q$1@fred.mathworks.com>
References: <2037152987.255198.1275319502015.JavaMail.root@gallium.mathforum.org>
Reply-To: <HIDDEN>
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 1275320405 17722 172.30.248.38 (31 May 2010 15:40:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 31 May 2010 15:40:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:640919

enviro <farhadnejadkoorki@yahoo.co.uk> wrote in message <2037152987.255198.1275319502015.JavaMail.root@gallium.mathforum.org>...
> How to mean columns(2 to end )of a matrix based on the unique values of column 1. Any idea?
> 
> input=[
>      2    10      50
>      1    20     100
>      2    30     150
>      1    40     200
>      1    60     300];
> 
> output=[
>      1    40    100
>      2    20    200
>       ];

a hint:
- look at jd's FEX submission

http://www.mathworks.com/matlabcentral/fileexchange/8354-consolidator

us