function z = bsxne(x, y) % bsxne(x, y) = bsxfun(@ne, x, y); % Binary "Not equal" operator applied element-wise to x and y. % Singleton dimensions are implicitly expanded to make x and y match in size. z = bsxfun(@ne, x, y);