Optimization: principles and algorithms, by Michel Bierlaire
hyperbolicTangent.m
Go to the documentation of this file.
1 %> @file
2 %> Hyperbolic tangent function. Equation (14.9) in \cite Bier15-book
3 %> \f[\frac{e^{\alpha}-e^{-\alpha}}{e^{\alpha}+e^{-\alpha}}\f]
4 %> @author <a href="http://people.epfl.ch/michel.bierlaire">Michel Bierlaire</a>
5 %> @date Sat Mar 21 17:25:23 2015
6 %> @ingroup Examples
7 %> @ingroup chap14
8 
9 %> Hyperbolic tangent function. Equation (14.9) in \cite Bier15-book
10 function [phi,deriv] = hyperbolicTangent(alpha)
11  phi = (exp(alpha)-exp(-alpha)) / (exp(alpha)+exp(-alpha)) ;
12  deriv = 4 * exp(2*alpha) / (exp(2*alpha)+1)^2 ;
13 endfunction
function hyperbolicTangent(in alpha)
Hyperbolic tangent function. Equation (14.9) in .
Copyright 2015-2018 Michel Bierlaire