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

som_write_cod

Purpose

 Writes a self-organizing map struct to a file in SOM_PAK format.

Syntax

Description

 This function is offered for compatibility with SOM_PAK, a SOM 
 software package in C. It writes map struct to files in SOM_PAK format.

 See SOM_READ_COD for description of the SOM_PAK map file format.
 Because the SOM_PAK package does not support many of the features and
 options of the SOM Toolbox, some of the information is changed, or even
 lost. 

 SOM_PAK does not support 3- or higher dimensional map grids. These cannot
         be exported using this function.  
 SOM_PAK always supposes that the map has 'sheet' shape. 
 SOM_PAK only supports 'bubble' and 'gaussian' neighborhood functions.
         Any other neighborhood function is changed to 'gaussian'.
 SOM_PAK doesn't support component names. However, the component names are
         written on a comment line which begins with '#n '. Any spaces (' ') 
         in the component names are replaced with underscores ('_').      
 Information on map name, mask, training history and normalizations is lost.

 This function is only offered for compatibility with SOM_PAK. In general,
 when saving map structs in files, use 'save filename.mat sMap'. This is
 faster and retains all information of the map.

Required input arguments

  sMap       (struct) the SOM struct to be written
  filename   (string) the name of the input file

Examples

  som_write_cod(sMap,'map1.cod');

See also

som_read_cod Read a map from a file in SOM_PAK format.
som_read_data Reads data from an ascii file.
som_write_data Writes data struct into a file in SOM_PAK format.