net=newff([0 1; 0 1],[3 1],{'logsig', 'logsig'}, 'traingd');

net = init(net);

p = [0 0 1 1;0 1 0 1];
a = sim(net,p)
t=[0 1 1 0]

net.trainParam.epochs=2000;
net.trainParam.lr = 1;
net.trainParam.goal = 0.01;
[net tr]=train(net,p,t);
a = sim(net,p)
