<< mps_sec Trigonometric functions mps_sin >>

mpscilab >> mpscilab > Trigonometric functions > mps_sech

mps_sech

Element-wise hyperbolic secant function

Calling Sequence

mps_sech( rop, op )
rop = mps_sech( op )

Arguments

rop

multi-precision matrix

op

Scilab or multi-precision matrix

Description

Calculates the element-wise hyperbolic secant of op and returns the result in rop.

Usage notes

Like most mps functions the mps_sech( 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.

Limitations

It is not currently possible to overload the Scilab sech() function.

Examples

// Standard usage.
A = [1 -2; 3 -4]
mpsA = mps_init2(A,100)
rop = mps_sech(mpsA)

// Same but using a Scilab matrix as input.
A = [1 -2; 3 -4]
rop = mps_init(2,2,100)
mps_sech(rop,A)

// In-place computation.
A = [1 -2; 3 -4]
mpsA = mps_init2(A,100)
mps_sech(mpsA,mpsA)

See Also

<< mps_sec Trigonometric functions mps_sin >>