| Neural Network Toolbox | ![]() |
Graph and Symbol
Syntax
Description
The hard limit transfer function forces a neuron to output a 1 if its net input reaches a threshold, otherwise it outputs 0. This allows a neuron to make a decision or classification. It can say yes or no. This kind of neuron is often trained with the perceptron learning rule.
hardlim is a transfer function. Transfer functions calculate a layer's output from its net input.
N - S x Q matrix of net input (column) vectors.
and returns 1 where N is positive, 0 elsewhere.
hardlim(code) returns useful information for each code string,
deriv' - Name of derivative function.
'name' - Full name.
'output' - Output range.
'active' - Active input range.
Examples
Here is the code to create a plot of the hardlim transfer function.
Network Use
You can create a standard network that uses hardlim by calling newp.
To change a network so that a layer uses hardlim, set net.layers{i}.transferFcn to 'hardlim'.
In either case call sim to simulate the network with hardlim.
See newp for simulation examples.
Algorithm
The transfer function output is one is n is less than or equal to 0 and zero if n is less than 0.
hardlim(n) = 1, if n >= 0; 0 otherwise.
See Also
| gridtop | hardlims | ![]() |