tanh Syntax tanh(X) Details The hyperbolic tangent function. Parameters X is a scalar/vector/matrix. Returns DOUBLE type with the same data form as X. Examples tanh(0 1 2); // output: [0,0.761594,0.964028]