I need to take pairwise combination of a large vector v (770×1). The commands combnk and combntns come with a precaution that they are slow for large vectors.
>> tic, a = combnk(v,2); tocElapsed time is 3.081594 seconds.>> tic, a = combntns(v,2); tocElapsed time is 3.147092 seconds.
Is there any other alternative that is more efficient?
Best Answer