www.gusucode.com > nnet 案例源码 matlab代码程序 > nnet/RefPerceptronExample.m

    %% RefPerceptron
% This example shows 
%% code

% Copyright 2015 The MathWorks, Inc.

x = [0 0 1 1; 0 1 0 1];
t = [0 1 1 1];
net = perceptron;
net = train(net,x,t);
view(net)
y = net(x);