| Neural Network Toolbox | Search  Help Desk |
| plotpv | Examples See Also |
Plot perceptron input/target vectors
plotpv(p,t)plotpv
(P,T) take these inputs,
P - R x Q matrix of input vectors (R must be 3 or less).
T - S x Q matrix of binary target vectors (S must be 3 or less).
P with markers based on T.
plotpv(P,T,V) takes an additional input,
V - Graph limits = [x_min x_max y_min y_max]
V.
The code below defines and plots the inputs and targets for a perceptron:
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})
plotpc