Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re:
Date: Sat, 1 Dec 2007 21:29:50 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 52
Message-ID: <fisjoe$idh$1@fred.mathworks.com>
References: <fiq28t$6qq$1@fred.mathworks.com> <fiq3pf$4oc$1@canopus.cc.umanitoba.ca> <fiq5me$64a$1@fred.mathworks.com> <fiq6je$k8t$1@fred.mathworks.com> <fiqgul$r2o$1@fred.mathworks.com> <fisi89$1uk$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1196544590 18865 172.30.248.38 (1 Dec 2007 21:29:50 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 1 Dec 2007 21:29:50 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:440375



any idea why this got posted so many times?

"David Doria" <daviddoria@gmail.com> wrote in message
<fisi89$1uk$1@fred.mathworks.com>...
> thanks alot.  the function handle @ is very easy to
> understand when you read the help! haha
> 
> dave
> 
> "David Doria" <daviddoria@gmail.com> wrote in message
> <fiqgul$r2o$1@fred.mathworks.com>...
> > ahh thats a good idea
> > I'll have to look into that code this weeeknd - i never
> > really followed the @ in matlab, but I haven't done my
> > research on it!
> > 
> > thanks!
> > 
> > "Bruno Luong" <brunoluong@yahoo.com> wrote in message
> > <fiq6je$k8t$1@fred.mathworks.com>...
> > > "David Doria" <daviddoria@gmail.com> wrote in message
> > > <fiq5me$64a$1@fred.mathworks.com>...
> > > > 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.
> > > > 
> > > 
> > > Can you just call two modes, one for char, once for
integer?
> > > 
> > > c={1 2 1 'a' 3 'b' 'a' 2 'a' 10};
> > > 
> > > [mostc fc]=mode(double(cell2mat(c(cellfun(@ischar,c)))))
> > > [mosti
fi]=mode(double(cell2mat(c(cellfun(@isnumeric,c)))))
> > > 
> > > if fc>fi % char wins
> > >   mostelem=char(mostc)
> > > else % integer wins
> > >   mostelem=mosti
> > > end
> > > 
> > > Bruno
> > > 
> > 
>