MATLAB: Determining unique abbreviations in a dataset

charcountsortstringsunique

I have a dataset in the char format. For example
RPG
RTS
RTS
GBA
PSP
PS3
XBX
TBS
FFS
would be 8.
Is there a function I can use to return the number of unique abbreviations in the dataset. I have tried length(unique(x)), but that did not return the correct answer.

Best Answer

size(unique(x, 'rows'),1)