# purelin

Linear transfer function

## Syntax

``A = purelin(N)``
``info = purelin('code')``

## Description

example

````A = purelin(N)` takes an `S`-by-`Q` matrix of net input (column) vectors, `N`, and returns an `S`-by-`Q` matrix equal to `N`, `A`. ```
````info = purelin('code')` returns useful information for each `code` character vector: `purelin('name')` returns the name of this function.`purelin('output')` returns the `[min max]` output range.`purelin('active')` returns the `[min max]` active input range.`purelin('fullderiv')` returns 1 or 0, depending on whether `dA_dN` is `S`-by-`S`-by-`Q` or `S`-by-`Q`.`purelin('fpnames')` returns the names of the function parameters.`purelin('fpdefaults')` returns the default function parameters. ```

## Examples

collapse all

This example shows how to create and plot a `purelin` transfer function and assign it to layer `i` in a network.

Create a plot of the `purelin` transfer function:

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

Assign this transfer function to layer `i` in a network.

```net.layers{i}.transferFcn = 'purelin'; ```

## Input Arguments

collapse all

Net column vector inputs, specified as an`S`-by-`Q` matrix.

## Output Arguments

collapse all

Linear transfer function, returned as an `S`-by-`Q` matrix.

## Algorithms

```a = purelin(n) = n ```

## Version History

Introduced before R2006a