Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

hardlim

Hard-limit transfer function

Graph and Symbol

Syntax

A = hardlim(N,FP)

Description

hardlim is a neural transfer function. Transfer functions calculate a layer's output from its net input.

A = hardlim(N,FP) takes N and optional function parameters,

N

S-by-Q matrix of net input (column) vectors

FP

Struct of function parameters (ignored)

and returns A, the S-by-Q Boolean matrix with 1s where N ≥ 0.

info = hardlim('code') returns information according to the code string specified:

hardlim('name') returns the name of this function.

hardlim('output',FP) returns the [min max] output range.

hardlim('active',FP) returns the [min max] active input range.

hardlim('fullderiv') returns 1 or 0, depending on whether dA_dN is S-by-S-by-Q or S-by-Q.

hardlim('fpnames') returns the names of the function parameters.

hardlim('fpdefaults') returns the default function parameters.

Examples

Here is how to create a plot of the hardlim transfer function.

n = -5:0.1:5;
a = hardlim(n);
plot(n,a)

Assign this transfer function to layer i of a network.

net.layers{i}.transferFcn = 'hardlim';

More About

collapse all

Algorithms

hardlim(n) = 1 if n ≥ 0

                         0 otherwise

See Also

|

Introduced before R2006a

Was this topic helpful?