?? logsig.m
字號:
function a = logsig(n,b)
%LOGSIG Log sigmoid transfer function.
%
% LOGSIG(N)
% N - SxQ Matrix of net input (column) vectors.
% Returns the values of N squashed between 0 and 1.
%
% EXAMPLE: n = -10:0.1:10;
% a = logsig(n);
% plot(n,a)
%
% LOGSIG(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:25:39 $
if nargin < 1, error('Note enough arguments.'); end
if nargin==2
[nr,nc] = size(n);
n = n + b*ones(1,nc);
end
a = 1 ./ (1+exp(-n));
i = find(~finite(a));
a(i) = sign(n(i))*0.5 + 0.5;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -