Thank you for your response. This is exactly the reason why I made this post. In my opinion MatLab needs a better combinatorial package. So stimulating discussion on it is very important in my opinion.
This functionality is already provided by the generic matlab function NCHOOSEK. See NCHOOSE2 for a very fast implementation of nchoosek with k =2, that does the same is submission, but much faster:
tic ; A = group(1:500) ; toc ;
% Elapsed time is 11.030943 seconds.
tic ; B = nchoose2(1:500) ; toc ;
% Elapsed time is 0.014382 seconds.
isequal(A,B)
% ans = 1
This submission Group uses a nested for-loop without pre-allocation making it quite slow.
NCHOOSE2 can be found here:
http://www.mathworks.com/matlabcentral/fileexchange/20144