感知器matlab实例,感知器算法----Matlab实现
data=[0 0 -1;0 1 1 ; -1 0 1 ; 1 1 -1];X = data(:, [1, 2]); y = data(:, 3);m = size(X,1);plotData2(X,y);X = [ones(m,1) X];error = 1;W=[0;0;0];first = 1;tim=0;alph=0.1;hold onaxis([-2 2 -2 2]);x1=-2:0.2...