MTM - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : MTM Package : MTM/ElementwiseOr

MTM

  

ElementwiseOr

  

element-wise logical or

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ElementwiseOr(M1,M2)

Parameters

M1

-

matrix, vector, array or scalar

M2

-

matrix, vector, array or scalar

Description

• 

The command ElementwiseOr(M1,M2) performs an element-wise comparison of M1 and M2.

• 

For matrices M1 and M2, the result R is a matrix where  R[i,j] = 1, if either M1[i,j] or M2[i,j] is non-zero, and R[i,j] = 0 otherwise.

• 

For matrix M1 and scalar M2, the result R is a matrix where  R[i,j] = 1, if either M1[i,j] or M2 is non-zero, and R[i,j] = 0 otherwise.

• 

For scalar M1 and matrix M2, the result R is a matrix where  R[i,j] = 1, if either M1 or M2[i,j] is non-zero, and R[i,j] = 0 otherwise.

• 

For scalars M1 and M2, the result R = 1, if either M1 or M2 is non-zero, R = 0 otherwise.

• 

M1 and M2 must be the same size, or scalars.  

Examples

withMTM:

M1Matrix1,0,0,4:

M2Matrix1,0,3,0:

ElementwiseOrM1,M2

1011

(1)

M1Matrix1,0,0,4:

ElementwiseOrM1,3

1111

(2)

See Also

MTM[ElementwiseAnd]

MTM[ElementwiseNot]

MTM[eq]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam