lt - Maple Help

Online Help

All Products    Maple    MapleSim


MTM

  

lt

  

element-wise less than comparison

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

lt(M1,M2)

Parameters

M1

-

matrix, vector, array or scalar

M2

-

matrix, vector, array or scalar

Description

• 

The command lt(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 M1[i,j] < M2[i,j], and R[i,j] = 0 otherwise.

• 

For matrix M1 and scalar M2, the result R is a matrix where  R[i,j] = 1, if M1[i,j] < M2, and R[i,j] = 0 otherwise.

• 

For scalar M1 and matrix M2, the result R is a matrix where  R[i,j] = 1, if M1< M2[i,j], and R[i,j] = 0 otherwise.

• 

For scalars M1 and M2, the result R = 1, if M1 < M2, and R = 0 otherwise.

• 

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

Examples

withMTM&colon;

M1Matrix1&comma;2&comma;4&comma;4&colon;

M2Matrix1&comma;2&comma;3&comma;5&colon;

ltM1&comma;M2

0001

(1)

M1Matrix1&comma;2&comma;4&comma;4&colon;

ltM1&comma;2

1000

(2)

See Also

MTM[eq]

MTM[ge]

MTM[gt]

MTM[le]

MTM[ne]