Stack Exchange
how to create a code of neural network LVQ (learning vector quantization) with 2 inputs and 5-class classification
I have to get a sample source code in matlab like this 
P = [-3 -2 -2  0  0  0  0 +2 +2 +3; ...
  0 +1 -1 +2 +1 -1 -2 +1 -1  0];
Tc = [2 2 2 1 1 1 1 2 2 2];
T = ind2vec(Tc);
net = newlvq(minmax(P),4,[.6 .4]);
net = train(net,P,T);
net.IW{1,1}
Y = sim(net,P)
Yc = vec2ind(Y)

as we see the example of using two-class classification, well now I want to make a 5-class classification but still with 2 input? how to call the metod net = newlvq (PR, S1, PC, LR, LF) 
please help me in need to work on my thesis..

Maybe you should specify your problem clearly. From what I understand you want to have five prototypes, but there are several interpretations:

It can be one prototype per one class, in which you need to have five different class labels in your label storage.
In case you have two class labels but you want to use multiple prototypes to represent each class, you have to design the LVQ yourself.
what is 2 input that you mention? if it is the training data, I do not see the point of using two sample data while having five different class labels. For your information, you do not need a complex algorithm to classify two data, it is called comparison!.
This option is actually what makes sense. If you are looking at a training data with five dimension. In this case I suggest that you look into Gaussian distributions or clusters. 

