在matlab中可以使用newff()和feedforwordnet 创建一个BP神经网络,推荐使用feedforwordnet创建BP神经网络,若想了解其用法,可以使用help命令,查询帮助 mse是一个网络性能函数。它根据平方误差的平均值来衡量网络的性能 (一) x=-4:.5:4; y=x.^2-x; net=newff(minmax(x),minmax(y),10); % net为新版newff创建的 net=train(net,x,y); % 训练 xx=-4:.2:4; yy=net(xx); plot(x,y,'o-',xx,yy,'*-') title('新版newff newff(minmax(x),minmax(y),10) ')