Neural Network Toolbox Previous page   Next Page
hardlims

Symmetric hard limit transfer function

Graph and Symbol

Syntax

A = hardlims(N)

info = hardlims(code)

Description

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,

and returns 1 where N is positive, -1 elsewhere.

hardlims(code) return useful information for each code string:

Examples

Here is the code to create a plot of the hardlims transfer function.

Network Use

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.

Algorithm

The transfer function output is one is n is greater than or equal to 0 and -1 otherwise.

hardlim(n) = 1, if n >= 0; -1 otherwise.

See Also

sim, hardlim


Previous page  hardlim hextop Next page

© 1994-2005 The MathWorks, Inc.