| Neural Network Toolbox | |
| Provide feedback about this page |
Graph and Symbol
Syntax
Description
compet is a neural transfer function. Transfer functions calculate a layer's output from its net input.
compet(N,FP) takes N and optional function parameters,
N |
S x Q matrix of net input (column) vectors |
FP |
Struct of function parameters (ignored) |
and returns the S x Q matrix A with a 1 in each column where the same column of N has its maximum value, and 0 elsewhere.
compet('dn',N,A,FP) returns the derivative of A with respect to N. If A or FP is not supplied or is set to [], FP reverts to the default parameters, and A is calculated from N.
compet('name') returns the name of this function.
compet('output',FP) returns the [min max] output range.
compet('active',FP) returns the [min max] active input range.
compet('fullderiv') returns 1 or 0, depending on whether dA_dN is S x S x Q or S x Q.
compet('fpnames') returns the names of the function parameters.
compet('fpdefaults') returns the default function parameters.
Examples
Here you define a net input vector N, calculate the output, and plot both with bar graphs.
n = [0; 1; -0.5; 0.5]; a = compet(n); subplot(2,1,1), bar(n), ylabel('n') subplot(2,1,2), bar(a), ylabel('a')
Assign this transfer function to layer i of a network.
See Also
| Provide feedback about this page |
![]() | combvec | con2seq | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |