function [A] = andnot(A,B)
    [hA,wA] = size(A);
    [hB,wB] = size(B);
    assert(hA == hB && wA == wB);
    A = logical(A);
    B = logical(B);
%   A(B) = false;
%   BUG WORKAROUND
    A -= A .* B;
    A = logical(A);
endfunction
