P=[-0.3 -0.4 0.4 0.7 0.2 0.7 0.4 -0.6 0.8 0.2; 1 1.2 0.7 0.3 0.5 0.5 0.2 0.9 0.4 0.2; 0.4 0.6 -0.1 -1.0 -0.3 -0.5 -0.4 0.5 -0.4 1.0];
net=newc([-1 1; 0 2; -1 1],4);
net = train(net,P);
Y = sim(net,P);
Yc = vec2ind(Y)