Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re:
Date: Fri, 30 Nov 2007 23:17:34 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 38
Message-ID: <fiq5me$64a$1@fred.mathworks.com>
References: <fiq28t$6qq$1@fred.mathworks.com> <fiq3pf$4oc$1@canopus.cc.umanitoba.ca>
Reply-To: "David Doria" <daviddoria@gmail.com>
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 1196464654 6282 172.30.248.35 (30 Nov 2007 23:17:34 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 30 Nov 2007 23:17:34 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:440296



that actually might work in this case since i'll probably
have a one to one mapping from character sets to summed
ascii numbers.  however, if i was not sure i would have this
one to one mapping , my original question of whether there
is some sort of function that already does this holds.

thanks,

david

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <fiq3pf$4oc$1@canopus.cc.umanitoba.ca>...
> In article <fiq28t$6qq$1@fred.mathworks.com>,
> David Doria <daviddoria@gmail.com> wrote:
> >I have a cell array like
> 
> >[1] [1] [2] [a] [1] [a] [2] [a]
> 
> >and i want to determine which is the most frequently
> >occurring "character" (similar to the "mode" of a strictly
> >integer array).
> 
> >Is there a function that will do this?
> 
> hist() or histc(). The easiest way to convert the characters
> to numbers is to add 0 to the character: e.g.,
> 
>  'hello' + 0
> 
> will be a numeric array of length 5 containing the numeric
codes
> for each character.
> -- 
>   "There are some ideas so wrong that only a very
intelligent person
>   could believe in them."                            --
George Orwell