[神经网络]Matlab神经网络原理5.5.1节 - 感知器线性回归(工具箱)

版权声明:转载请说明Zhonglihao原创 https://blog.csdn.net/xeonmm1/article/details/83628665
clear;clc;
clear all;

% 构造直线 带噪声
x = -5:5;
y = 3 * x - 7;
randn('state',2);
y = y + randn(1,length(y))*1.5;
plot(x,y,'o');

% 训练
P = x; % 输入
T = y; % 期望
net = newlind(P,T); % 训练网络
new_x = -5:.2:5;
new_y = sim(net,new_x);
hold on;plot(new_x,new_y);

net.iw
net.b

猜你喜欢

转载自blog.csdn.net/xeonmm1/article/details/83628665