%% UgSelforg
%% gridtop

pos = gridtop([8 10]);
plotsom(pos)

%
%% hextop

pos = hextop([8 10]);
plotsom(pos)

%
%% randtop

pos = randtop([8 10]);
plotsom(pos)

%
%% create SOM network

net = selforgmap([2 3]);

%
%% create SOM vectors

P = [.1 .3 1.2 1.1 1.8 1.7 .1 .3 1.2 1.1 1.8 1.7;...
0.2 0.1 0.3 0.1 0.3 0.2 1.8 1.8 1.9 1.9 1.7 1.8];

%
%% create SOM plot

net = configure(net,P);
plotsompos(net,P)

%
%% train SOM

net.trainParam.epochs = 1000;
net = train(net,P);
plotsompos(net,P)

% Copyright 2012 The MathWorks, Inc.