MTM
ElementwiseNot
element-wise logical not
Calling Sequence
Parameters
Description
Examples
ElementwiseNot(M)
M
-
matrix, vector, array or scalar
The command ElementwiseNot(M) performs an element-wise logical not on M.
For matrix M, the result R is a matrix where R[i,j] = 1, if M[i,j] = 0, and R[i,j] = 0 otherwise.
For scalar M, the result R = 1, if M is 0, and R = 0 otherwise.
with⁡MTM:
M≔Matrix⁡−1,0,3,0:
ElementwiseNot⁡M
0101
See Also
MTM[ElementwiseAnd]
MTM[ElementwiseOr]
MTM[eq]
Download Help Document