Neural Network Toolbox | Search  Help Desk |
hardlims | Examples See Also |
Symmetric hard limit transfer function
A = hardlims(N)
info = hardlims(code)
The symmetric hard limit transfer function forces a neuron to output a 1 if its net input reaches a threshold. Otherwise it outputs -1. Like the regular hard limit function, this allows a neuron to make a decision or classification. It can say yes or no.
hardlims
is a transfer function. Transfer functions calculate a layer's output from its net input.
hardlims
(N
) takes one input,
N - S
x Q
matrix of net input (column) vectors.
N
is positive, -1 elsewhere.
hardlims
(code
) return useful information for each code
string:
Here is the code to create a plot of the hardlims
transfer function.
n = -5:0.1:5; a = hardlims(n); plot(n,a)You can create a standard network that uses hardlims by calling
newp
.
To change a network so that a layer uses hardlims, set net.layers{i}.transferFcn
to 'hardlims
'.
In either case call sim
to simulate the network with hardlims.
See newp
for simulation examples.
hardlim(n)
= 1, if n
>= 0; -1 otherwise.
sim
,
hardlim