Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Is an entry in a matrix largest, or second largest, or ...?
Date: Thu, 29 Mar 2012 17:49:12 +0000 (UTC)
Organization: Xoran Technologies
Lines: 8
Message-ID: <jl27ao$f6s$1@newscl01ah.mathworks.com>
References: <jl26m4$d38$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1333043352 15580 172.30.248.37 (29 Mar 2012 17:49:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 29 Mar 2012 17:49:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:762614

"David Epstein" <David.Epstein.spam@remove.warwick.ac.uk> wrote in message <jl26m4$d38$1@newscl01ah.mathworks.com>...
> Let M be a matrix of doubles, and m an entry of M. Then we can find the rank of m in M as sum(M>m) + sum(M==m)/2
> 
> What I want to do is to determine the rank of all entries of M. The only way I can think of using arrayfun is to have M as a global variable.
> 
> Or is there some better way? Loop??

When not histogram M using HISTC or similar?