📄 poslin.m
字号:
function a = poslin(n,b)
%POSLIN Positive linear transfer function.
%
% POSLIN(N)
% N - SxQ Matrix of net input (column) vectors.
% Returns the values of N squashed between -1 an 1.
%
% EXAMPLE: n = -10:0.1:10;
% a = poslin(n);
% plot(n,a)
%
% POSLIN(Z,B) ...Used when Batching.
% Z - SxQ Matrix of weighted input (column) vectors.
% B - Sx1 Bias (column) vector.
% Returns the squashed net input values found by adding
% B to each column of Z.
% Mark Beale, 1-31-92
% Revised 12-15-93, MB
% Copyright (c) 1992-94 by The MathWorks, Inc.
% $Revision: 1.1 $ $Date: 1994/01/11 16:29:26 $
if nargin < 1, error('Not enough arguments.'); end
if nargin==2
[nr,nc] = size(n);
n = n + b*ones(1,nc);
end
a = n .* (n > 0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -