<< Comparison functions Comparison functions mps_greater >>

mpscilab >> mpscilab > Comparison functions > mps_equal

mps_equal

Equality predicate operation

Calling Sequence

rop = mps_equal( 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 and op2 and set the corresponding element of the boolean matrix rop to True if they are equal or False otherwise.

rop = mps_equal( rop, op1, op2 )

Compare each elements of op1 and op2 and set the corresponding element of the boolean matrix rop to True if they are equal or False otherwise.

rop = op1 == op2

Overloaded Scilab equality 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_equal(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
<< Comparison functions Comparison functions mps_greater >>