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