sim命令将运行指定的模型。模型执行时使用传递给sim命令的数据,这些数据包括在options结构中设定的参数值。a=sim(net,[ ])中,net是你的训练网络,后面的中括号是你要训练的结构参数!
P = [0 1 2 3 4 5 6 7 8 9 10];
T = [0 1 2 3 4 3 2 1 2 3 4];
net = newff(P,T,5);
Y = sim(net,P);
plot(P,T,P,Y,'o')
net.trainParam.epochs = 50;
net = train(net,P,T);
Y = sim(net,P);
plot(P,T,P,Y,'o')
sim命令
=sim(net,[ ])函数