matlab 7.8版本 就是2009a 的版本,这段程序哪位大虾帮忙看看,有好多错误,我不懂,菜鸟..clear all;p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,2

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/19 23:25:33
matlab 7.8版本 就是2009a 的版本,这段程序哪位大虾帮忙看看,有好多错误,我不懂,菜鸟..clear all;p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,2
xoDөk'cH(Bgn sĞ*uƘv*@*Ͳ3/89ɶ~gfd1[ul==ֈޑQPǎG+vNv=~xMًݳv0>:=z0ۺ Uu6MB@ut j 0mҁnp_@쪃d> e2*jx7/|ETMbO~nea4iQBA|B[nPq{ސlMy?>'c}{vs>d[ٓC6F!: s`W%7@QP g$I@o8JV6@'QwWx*BIWM;ͅ]|@{~'u`5Ԝ}OFru\ѼZzdWq5/_5{>{7qt Q [ цx2hE W_n!_d8yX|w_)—ɔ ?+~z⥴.{yJ&Iq7F56w",WXdYHH gŶ7d\ /{5ૅ]ϫΣ_U_FQwMcR_RҾ.uiډhR#QڧMzڠgAu 'I6 2-vL1o;P| ðNLBOj6lzvCʥWbk^a[md:'-=4_nMK)I; Vl

matlab 7.8版本 就是2009a 的版本,这段程序哪位大虾帮忙看看,有好多错误,我不懂,菜鸟..clear all;p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,2
matlab 7.8版本 就是2009a 的版本,这段程序哪位大虾帮忙看看,有好多错误,我不懂,菜鸟..
clear all;
p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,20];
t=[0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3];
p=p'
[pn,minp,maxp]=mapminmax(p);
%创建BP网络和定义训练函数及参数
net=newff(minmax(pn),[8 1],{tansig',purelin'},trainlm');
net.trainparam.show=25;
net.trainparam.goal=0.0001;
net.trainparam.epochs=1000;
%训练神经网络
[net,tr]=train(net,p,t);
%输出训练后的权值和阈值
iw1=net.iw{1}
b1=net.b{1}
iw2=net.lw{2}
b2=net.b{2}
调到可以运行 我会追加分数的!

matlab 7.8版本 就是2009a 的版本,这段程序哪位大虾帮忙看看,有好多错误,我不懂,菜鸟..clear all;p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,2

clear all;

p=[50,0.1,11,32;30,0.05,9.5,29.5;70,0.16,13,34.5;30,0.16,9.5,34.5;70,0.05,13,29.5;15,0.01,4,20;100,1,20,50;15,1,4,50;100,0.01,20,20];

t=[0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3];

p=p'

[minp,maxp]=mapminmax(p);

%创建BP网络和定义训练函数及参数

net=newff(minmax(minp),[8 1],{'tansig','purelin'},'trainlm');

net.trainparam.show=25;

net.trainparam.goal=0.0001;

net.trainparam.epochs=1000;

%训练神经网络

[net,tr]=train(net,p,t);

%输出训练后的权值和阈值

iw1=net.iw{1}

b1=net.b{1}

iw2=net.lw{2}

b2=net.b{2}