function c = multisetcomb(varargin)
% return all combinations of items in given column vectors by picking up one
% item from each at once.
s1 = varargin{1};
s2 = varargin{2};
c = [repmat(s1,size(s2,1),1) sortrows(repmat(s2,size(s1,1),1))];
if length(varargin) > 2
c = multisetcomb(c,varargin{3:end});
end
shg #2184() [ Matlab ] Rating0/0=0.00
function c = multisetcomb(varargin) % return all combinations of items in given column vectors by picking up one % item from each at once. s1 = varargin{1}; s2 = varargin{2}; c = [repmat(s1,size(s2,1),1) sortrows(repmat(s2,size(s1,1),1))]; if length(varargin) > 2 c = multisetcomb(c,varargin{3:end}); endRating0/0=0.00-0+
[ reply ]