x = rand(2,800)*4*pi-2*pi;
y = sin(x(1,:)+x(2,:));

select=1;

% selection of method
switch select
    case 1
        trainFcn = 'trainlm';
    case 2
        trainFcn = 'traingd';
end
classifier2_net = feedforwardnet(30,trainFcn);
classifier2_net = train(classifier2_net, x, y);
output = classifier2_net(x);
mean(abs(output-y))