My question is Matlab related. There exist a fnct named nchoosek([vector],integer). By using this function I would like to get all 2-elements combinations of the given vector. (i.e nchoosek([1:10000, 2])). This is very slow, as stated in matlab documentation.
The question is : "Is there a faster way to do the same job?".
Thank you for your time I really appreciate your efforts.