<< Trigonometric functions Trigonometric functions mps_acosh >>

mpscilab >> mpscilab > Trigonometric functions > mps_acos

mps_acos

Element-wise arccosine function

Calling Sequence

mps_acos( rop, op )

Overloaded usage:

rop=acos( op )

Arguments

rop

multi-precision matrix

op

Scilab or multi-precision matrix

Description

Calculate the element-wise arccosine of op and returns the result in rop.

mps_acos( rop, op )

Set every elements of rop to the arccosine of the corresponding elements of op.

rop=acos( op )

Overloaded Scilab primitive acos(). Create a multi-precision matrix the same size and precision as op containing the result.

Usage notes

Like most mps functions except for the overloaded case rop must be an initialized multi-precision matrix of the right size. The result operand can be the same as the input operand. This performs a faster and memory efficient in-place operation.

Examples

// Standard usage.
A = [1 -1; 0.5 0.4]
mpsA = mps_init2(A,100)
rop = mps_init(2,2,100)
mps_acos(rop,mpsA)

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

// In-place computation.
A = [1 -1; 0.5 0.4]
mpsA = mps_init2(A,100)
mps_acos(mpsA,mpsA)

// Overloaded usage.
A = [1 -1; 0.5 0.4]
mpsA = mps_init2(A,100)
rop = acos(mpsA)

See Also

<< Trigonometric functions Trigonometric functions mps_acosh >>