wolffd@0: function net = somunpak(net, w) wolffd@0: %SOMUNPAK Replaces node weights in SOM. wolffd@0: % wolffd@0: % Description wolffd@0: % NET = SOMUNPAK(NET, W) takes a SOM data structure NET and weight wolffd@0: % matrix W (each node represented by a row) and puts the nodes back wolffd@0: % into the multi-dimensional array NET.MAP. wolffd@0: % wolffd@0: % The ordering of the parameters in W is defined by the indexing of the wolffd@0: % multi-dimensional array NET.MAP. wolffd@0: % wolffd@0: % See also wolffd@0: % SOM, SOMPAK wolffd@0: % wolffd@0: wolffd@0: % Copyright (c) Ian T Nabney (1996-2001) wolffd@0: wolffd@0: errstring = consist(net, 'som'); wolffd@0: if ~isempty(errstring) wolffd@0: error(errstring); wolffd@0: end wolffd@0: % Put weights back into network data structure wolffd@0: net.map = reshape(w', [net.nin net.map_size]);