Main Content

poslin

Positive linear transfer function

Graph and Symbol

Syntax

A = poslin(N,FP)
info = poslin('code')

Description

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

A = poslin(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 matrix of N’s elements clipped to [0, inf].

info = poslin('code') returns information about this function. The following codes are supported:

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

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

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

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

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

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

Examples

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

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

Assign this transfer function to layer i of a network.

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

Network Use

To change a network so that a layer uses poslin, set net.layers{i}.transferFcn to 'poslin'.

Call sim to simulate the network with poslin.

Algorithms

The transfer function poslin returns the output n if n is greater than or equal to zero and 0 if n is less than or equal to zero.

poslin(n) = n, if n >= 0
          = 0, if n <= 0

Version History

Introduced before R2006a

See Also

| | |