%% Execute Logic Statement
% true along with false can be used to execute logic statements.
% Test the logical statement
%   ~(A and B) = (~A) or (~B)
% for A = true and B = false.

~(true & false) == (~true) | (~false)

% The result is logical 1 (true), since the logical statements on both sides of the equation are equivalent. This logical statement is an instance of De Morgan's Law.
% Copyright 2012 The MathWorks, Inc.