%% Compare Vector Elements
% Compare the elements in a column vector and a row vector. The result is a matrix containing the comparison of each combination of elements from the vectors. An equivalent way to execute this operation is with A > B.

A = [8; 17; 20; 24]

%

B = [0 10 21]

%

C = bsxfun(@gt,A,B)

% Copyright 2012 The MathWorks, Inc.