<< mps_equal Comparison functions mps_greaterequal >>

mpscilab >> mpscilab > Comparison functions > mps_greater

mps_greater

Greater-than predicate operation

Calling Sequence

rop = mps_greater( 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 greater False otherwise.

rop = mps_greater( 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 greater False otherwise.

rop = op1 > op2

Overloaded Scilab greater-than 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; 5 4]
B = [1 2; 3 4]
mpsA = mps_init2(A,100)
mpsB = mps_init2(B,100)
rop = mps_greater(mpsA,mpsB)

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