Neural Network Toolbox | Search  Help Desk |
plotpc | Examples See Also |
Plot a classification line on a perceptron vector plot
plotpc(W,b)plotpc
(W,B)
takes these inputs,
and returns a handle to a plotted classification line.
plotpc(W,B,H)
takes these inputs,
H -
Handle to last plotted line.
p = [0 0 1 1; 0 1 0 1]; t = [0 0 0 1]; plotpv(p,t)The following code creates a perceptron with inputs ranging over the values in
P
, assigns values to its weights and biases, and plots the resulting classification line.
net = newp(minmax(p),1); net.iw{1,1} = [-1.2 -0.5]; net.b{1} = 1; plotpc(net.iw{1,1},net.b{1})
plotpv