Daniel@0: function [c] = sompak(net) Daniel@0: %SOMPAK Combines node weights into one weights matrix. Daniel@0: % Daniel@0: % Description Daniel@0: % C = SOMPAK(NET) takes a SOM data structure NET and combines the node Daniel@0: % weights into a matrix of centres C where each row represents the node Daniel@0: % vector. 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, SOMUNPAK 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: % Returns map as a sequence of row vectors Daniel@0: c = (reshape(net.map, net.nin, net.num_nodes))';