www.gusucode.com > classification_matlab_toolbox分类方法工具箱源码程序 > code/Classification_toolbox/find_classes.m

    function [N, classes] = find_classes(targets)

%Find the number of target classes in the targets of a data set

classes = unique(targets);
N       = length(classes);