?? 建模.asv
字號:
%主元分析后的數據集124*6——6×6
%建模數據
m_data=[0.17291 0.61562 -0.23182 0.72739 -0.085257 -0.031892;
-0.51861 -0.16758 -0.19343 0.11447 -0.80028 0.10954;
-0.21276 -0.65128 -0.070456 0.61803 0.36643 -0.096825;
0.5657 -0.29331 -0.19992 0.06454 -0.14817 0.72654;
0.56077 -0.28381 -0.17084 -0.01873 -0.35697 -0.66935;
0.14631 -0.046753 0.91363 0.26708 -0.26198 0.041455];
%RBF建模
% K-means法確定RBF函數的中心、寬度和輸出權值
x=m_data(:,1:5);y=m_data(:,6);
c=x;
for i=1:1:6
for j=1:1:6
h(i,j)=(x(i,:)-c(j,:))*((x(i,:)-c(j,:))');
end
end
for j=1:1:6
cc(j)=min(h(j));
end
fai=exp(-(x-c)*((x-c)')/(2*delta));??
(??for i=1:1:6
for j=1:1:6
fai=exp(-(x(i,:)-c(j,:))*((x(i,:)-c(j,:))')/(2*delta)); [fai]=1*1??
end
end??
[ww,bint,err,errint,states]=regress(y,fai);
yy=purelin(fai*ww);
x=m_data(:,1:5);y=m_data(:,6);
p=x';
t=y';net=newrbe(p,t);
yy=sim(net,p);figure;plot(t,'r');hold on;plot(yy,'*');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -