perClass Documentation
version 5.1 (31-May-2017)
 SDLAB  Create label object

     LAB=SDLAB(NAMES)
     LAB=SDLAB('class 1',count1,'class 2',count2,...)
     LAB=SDLAB('cluster ',1:10)
     LAB=SDLAB(CLASSES,IND)  % given class names and sample indices
     LAB=SDLAB(CLASSES,'sizes',SIZES)   % given class names and per-class sizes

     LAB=SDLAB(STRUCT,FIELD)    % given a struct array and a field name

 INPUT
   NAMES     Cell array or character array with entry names
   IND       Vector with 1-based indices in CLASSES
   CLASSES   SDLIST, cell array or character array with class names
   SIZES     Vector of per-class sizes
   STRUCT    A struct array (e.g. output of dir('*.png') )
   FIELD     Structure field name

 OUTPUT
   LAB       SDLAB object

 DESCRIPTION
 SDLAB object describes a labels for a set of entries.  Each entry (data
 sample) is assigned to one category (class). Categories are described
 in a list accessible via LAB.list.
 SDLAB can be created from a struct array. For example, we may quickly
 load all PNG image filenames into SDLAB using:
 >> L=sdlab( dir('*.png'), 'name')