|
Re: Is there a better way to count number of occurances of string when grouping?
Posted:
Mar 20, 2012 6:11 PM
|
|
> I have a dataset svdatm with columns: > > % dnum (datenum) > % symid (symbol id - a cell array) > > I would like to find the count or number of elements (i.e., symid) > that occur each day.
In addition to the other suggestions, consider trying
crosstab(svdatm.dnum, svdatm.symid)
I don't know if it would be any faster, and it might require too much memory if there are lots of unique symid values, but it's a thought.
-- Tom
|
|