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$>
References: <jl26m4$d38$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1333043352 15580 (29 Mar 2012 17:49:12 GMT)
NNTP-Posting-Date: Thu, 29 Mar 2012 17:49:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:762614

"David Epstein" <> wrote in message <jl26m4$d38$>...
> 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?