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

som_fillnans

sD = som_fillnans(sD,sM,bmus)

 SOM_FILLNANS Replaces NaNs in the data matrix with values from
              SOM prototypes. 

   sD = som_fillnans(sD,sM, [bmus])

      sD      (struct) data struct
              (matrix) size dlen x dim
      sM      (struct) data struct, with .data of size dlen x dim
              (matrix) size dlen x dim, a matrix from which 
                       the values are taken from directly
              (struct) map struct: replacement values are taken from 
                       sM.codebook(bmus,:)
      [bmus]  (vector) BMU for each data vector (calculated if not specified)

 See also  SOM_MAKE.



[ SOM Toolbox online doc ]