In
MATLAB, ~A
performs a logical NOT
of input array A,
and returns an array containing elements set to either logical 1 (TRUE) or
logical 0
(FALSE). This is the
truth table and the representation of a NOT Gate as it's
represented in
digital electronics.
A
~A
0 1
1 0
This is a logical NOT gate, as
represented in electronic circuits
An element of the output array is set to 1 if A contains a zero
value element at that same array location. Otherwise, that
element is set to 0.