Neural Network Toolbox Previous page   Next Page

Creating a Perceptron (newp)

A perceptron can be created with the function newp

where input arguments:

Commonly the hardlim function is used in perceptrons, so it is the default.

The code below creates a perceptron network with a single one-element input vector and one neuron. The range for the single element of the single input vector is [0 2].

We can see what network has been created by executing the following code

which yields:

Note that the default learning function is learnp, which is discussed later in this chapter. The net input to the hardlim transfer function is dotprod, which generates the product of the input vector and weight matrix and adds the bias to compute the net input.

Also note that the default initialization function, initzero, is used to set the initial values of the weights to zero.

Similarly,

gives

We can see that the default initialization for the bias is also 0.


Previous page  Perceptron Architecture Simulation (sim) Next page

© 1994-2005 The MathWorks, Inc.