Y = cos(X)Y = cosh(X)
cos(X) is the circular cosine for each element of X.
cosh(X) is the hyperbolic cosine for each element of X.
M = magic(3)M =8 1 63 5 74 9 2cos(M*pi/4) =1.0000 0.7071 -0.0000-0.7071 -0.7071 0.7071-1.0000 0.7071 0.0000
cos(pi/2) is not exactly zero, but rather a value the size of the floating-point accuracy, eps, because pi is only a floating-point approximation to the exact value.

acos,asin,atan,exp,expm,funm,sin,tan
(c) Copyright 1994 by The MathWorks, Inc.