<< mps_less Comparison functions mps_lessgreater >>

mpscilab >> mpscilab > Comparison functions > mps_lessequal

mps_lessequal

Less or equal predicate operation

Calling Sequence

rop = mps_lessequal( op1, op2 )

Overloaded usage:

rop = op1 <= op2

Arguments

rop

Scilab matrix of boolean

op1, op2

multi-precision or Scilab matrices or scalars

Description

Compare each elements of op1 to op2 and set the corresponding element of the boolean matrix rop to True if it's less or equal False otherwise.

rop = mps_lessequal( rop, op1, op2 )

Compare each elements of op1 to op2 and set the corresponding element of the boolean matrix rop to True if it's less or equal False otherwise.

rop = op1 <= op2

Overloaded Scilab less or equal comparison.

Limitations

Currently op1 and op2 must be of the same size. Support for comparing a matrix with a single scalar is not implemented yet.

Examples

// Equality comparison between two MPS matrices.
A = [1 2; 3 4]
B = [1 2; 5 4]
mpsA = mps_init2(A,100)
mpsB = mps_init2(B,100)
rop = mps_lessequal(mpsA,mpsB)

//Overloaded usage
A = [1 2; 3 4]
B = [1 2; 5 4]
mpsA = mps_init2(A,100)
mpsB = mps_init2(B,100)
rop = mpsA <= mpsB
<< mps_less Comparison functions mps_lessgreater >>