<< mps_prod mpscilab mps_set_ele >>

mpscilab >> mpscilab > mps_round

mps_round

Round to nearest

Calling Sequence

mps_round( rop, op )
rop = mps_round( op )

Overloaded usage:

rop = round( op )

Arguments

rop, op

multi-precision matrix

Description

Returns the nearest representable integer of op.

mps_round( rop, op )

Set each element of rop to the nearest representable integer of the corresponding element of op.

rop = mps_round( op )

Creates a multi-precision matrix the same size and precision as op containing the result.

rop = round( op )

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

Examples

// Standard usage.
A = [1.1 2; 3.9 4]
mpsA = mps_init2(A,100)
rop = mps_init(2,2,100)
rop = mps_round(mpsA)

// In-place computation.
A = [1.1 2; 3.9 4]
mpsA = mps_init2(A,100)
mps_round(mpsA, mpsA)

// Overloaded usage.
A = [1.1 2; 3.9 4]
mpsA = mps_init2(A,100)
rop = round(mpsA)

See Also

<< mps_prod mpscilab mps_set_ele >>