Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to do this in the vector form?
Date: Wed, 21 Jan 2009 17:13:02 +0000 (UTC)
Organization: Xoran Technologies
Lines: 22
Message-ID: <gl7l2u$m9q$1@fred.mathworks.com>
References: <gl7i56$pei$1@fred.mathworks.com> <gl7ive$nrj$1@fred.mathworks.com> <gl7ki1$fhs$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232557982 22842 172.30.248.35 (21 Jan 2009 17:13:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 21 Jan 2009 17:13:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:512982


"Mohammad Monfared" <gohardoust@gmail.com> wrote in message <gl7ki1$fhs$1@fred.mathworks.com>...
> "Matt " <mjacobson.removethis@xorantech.com> wrote in message <gl7ive$nrj$1@fred.mathworks.com>...
> > "Mohammad Monfared" <gohardoust@gmail.com> wrote in message <gl7i56$pei$1@fred.mathworks.com>...
> > > Hi everybody!
> > > 
> > > I have a 12 by 200 matrix, say A. I'd like to compute the mean values of each row for non-zero elements. I know some ways to to this job but not the vector form solution. Is there any vector-form answer? 
> > > 
> > > thanks,
> > > Reza.
> > 
> > sum(A,2)./sum(A~=0,2)
> > 
> 
> oh! Great and simple. so thanks!
> Is it possible to use the 'trimmean' function in vector form or the 'sort' should be employed?
> 
> Reza.


I'm not familiar with 'trimmean' nor with its relation to 'sort'.