Element-wise hyperbolic cosine function
mps_cosh( rop, op ) rop = mps_cosh( op )
Overloaded usage:
rop = cosh( op )
multi-precision matrix
Scilab or multi-precision matrix
Computes the element-wise hyperbolic cosine of op
and returns the result in rop
.
Sets every element of rop
to the hyperbolic cosine
of the corresponding element of op
.
rop
must be a pre-initialized matrix of the
same dimension as op
.
Creates a multi-precision matrix the same size and precision as
op
containing the result.
Overloaded Scilab primitive cosh(). Creates a multi-precision
matrix the same size and precision as op
containing the result.
Like most mps functions the mps_cosh( rop, op ) form is faster and
can reuse the space of an existing matrix but requires an already
initialized operand. Also, the same form can be used to perform an in-place
operation when rop
and op
are the
same.
// Standard usage. A = [1 -2; 3 -4] mpsA = mps_init2(A,100) rop = mps_cosh(mpsA) // Standard usage with a pre-allocated matrix to receive the result. A = [1 -2; 3 -4] mpsA = mps_init2(A,100) rop = mps_init(2,2,100) mps_cosh(rop,mpsA) // Same but using a Scilab matrix as input. A = [1 -2; 3 -4] rop = mps_init(2,2,100) mps_cosh(rop,A) // In-place computation. A = [1 -2; 3 -4] mpsA = mps_init2(A,100) mps_cosh(mpsA,mpsA) // Overloaded usage. A = [1 -2; 3 -4] mpsA = mps_init2(A,100) rop = cosh(mpsA) | ![]() | ![]() |