pmntanh.m

来自「人工神经网络:MATLAB源程序用于训练测试」· M 代码 · 共 24 行

M
24
字号
%#								
%# function t = pmntanh(x)					
%#								
%# AIM:		Fast hyperbolic tangent function to be used in	
%# 		neural networks instead of the tanh provided by MATLAB.
%#								
%# INPUT:	x (n x m) : matrix of data to be transformed								
%#								
%# OUTPUT:	t (n x m) : matrix of data after projection on the 
%#			  hyperbolic tangent nonlinear transfer function				
%# 								
%# AUTHOR:	Magnus Norgaard, IAU/EI/IMM (1994)		
%#		Neural Network-Based System Identification Toolbox
%#		Web site : http://www.iau.dk/Projects/proj/nnsysid.html
%#								
%# VERSION: 1.1 (28/02/1998)			
%#								
%# TEST:	Frederic Despagne 		
%#								

function t = pmntanh(x)

t = 1-2./(exp(2*x)+1);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?