%% All Combinations of Three Unsigned Integers Taken Two at a Time

v = uint16([10 20 30]);
C = nchoosek(v,uint16(2))

% Copyright 2012 The MathWorks, Inc.