Neural Network Toolbox Previous page   Next Page
hardlim

Hard limit transfer function

Graph and Symbol

Syntax

A = hardlim(N)

info = hardlim(code)

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.

hardlim(N) takes one input,

and returns 1 where N is positive, 0 elsewhere

hardlim(code) returns useful information for each code string,

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

sim, hardlims


Previous page  gridtop hardlims Next page

© 1994-2005 The MathWorks, Inc.