Matlab comman, count distinct items in a vector
I have been looking around the matlab help and cannot find it. I want a command that counts the number of distinct entries in a vector so that I can make a histogram (using hist(Y,nbins)) that is broken into the same number of bins as there are distinct entries.
Thanks
|