<< mps_neg mpscilab mps_pow >>

mpscilab >> mpscilab > mps_ones

mps_ones

Create and initialize a multi-precision matrix filled with ones

Calling Sequence

rop = mps_ones( prec )
rop = mps_ones( m1, n1, prec )
mps_ones( rop )

Overloaded usage:

rop = ones( op )

Arguments

rop, op

multi-precision matrix

m1, n1, prec

integers

Description

Create and initialize a multi-precision matrix filled with the value 1

rop = mps_ones( prec )

Create and initialize a scalar of precision prec initialized to 1.

rop = mps_ones( m1, n1, prec )

Create and initialize a matrix of size (m1,n1) with precision prec filled with ones.

mps_ones( rop )

Set every element of rop to 1.

rop = ones( op )

Overloaded Scilab primitive ones(). Create a multi-precision matrix the same size and precision as op filled with ones.

Restrictions

The precision must be two bits or higher.

Examples

mpsA = mps_ones(100)
mpsA = mps_ones(10,10,100)

//Set every elements of mpsB to 1.
mpsB = mps_init(10,10,100)
mps_ones(mpsB)

//Overloaded usage
mpsA = ones(mpsB)

See Also

<< mps_neg mpscilab mps_pow >>