SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/

som_divide

[V,I]=som_divide(sMap, D, inds, mode)

SOM_DIVIDE Divides a dataset according to a given map.

 [V,I]=som_divide(sMap, sData, [inds], [mode])

 ARGUMENTS ([]'s are optional) 

  sMap     (struct or matrix) map struct or codebook (size munits x dim)
  sData    (struct or matrix) data struct or matrix (size N x dim )
  [inds]            From which map units should the local data sets
                    be constructed. Interpretation depends on mode
                    argument. By default [1:munits].
           'class': (vector) munits x 1 matrix of class numbers
           'index': (vector) K x 1 vector of map node indexes 
           'index': (matrix) K x k matrix of map node subscripts
  [mode]   (string) 'index' or 'class', if inds is a vector of length 
                    munits, default is 'class', otherwise 'index'.
 RETURNS
  
 If mode == 'index' 
  V        (matrix) data vectors hitting the specified nodes (size K x dim)                   
  I        (vector) corresponding data row indexes (size K x 1)
   
 If mode == 'class' (this can be used after using som_select)
  V        (cell array) V{K} includes vectors whose BMU has class number 
                        K in the input matrix 'coord'. Note that 
                        values of K below 1 are ignored. 
  I        (cell array) corresponding data indexes in the cell array                        

 NOTE: if the same node is specified multiple times, only one
       set of hits is returned.

 See also SOM_BMU, SOM_HITS, SOM_SELECT.



[ SOM Toolbox online doc ]