https://www.mathworks.com/help/nnet/ug/cluster-with-self-organizing-map-neural-network.html#bss4b_l-3
check this.. it says that the weights are updated : W(k+1) = W(k) + alpha * [ (dist) ] rule.. where dist = distance between current neuron that you are updating and the winning neuron. k = iteration number alpha = learning rate