MATLAB: Find unique combinations of double and character elements

chardoubleMATLABnum2strunique

I have a cell type variable with 3 columns and 500000 rows, here is an example:
c1 c2 c3
A={1994 'AACE' 2071
1994 'AACE' 30677
1994 'AAC' 1541
1994 'AAC' 2027
1994 'AAC' 7843}
I am applying the following code:
%Unique combinations of c1 and c2
[y,~,ind] = unique([num2str(c1) c2], 'rows'); %Problem
%Count occurences
c = accumarray(ind,1);
%Final variable
F = [y c];
But it gives me an error in the first row, because I am trying to find unique combinations of 'double' and 'char' elements. Can someone help me? Thanks

Best Answer

A={1994 'AACE' 2071
1994 'AACE' 30677
1994 'AAC' 1541
1994 'AAC' 2027
1994 'AAC' 7843};
c12=cellfun(@(x,y) [num2str(x) y],A(:,1),A(:,2),'un',0);
[y,ii,ind] = unique(c12) %Problem
c = accumarray(ind,1);
F = [A(ii,:) num2cell(c)]