MATLAB: Show all possible combination

datamathematicsmatrix manipulation

dear all.
combination(28,4) is 20475. then how to show all of the 20475 combination. n the output matlab is notpad (dat or txt). i use matlab 2012a.
  • sorry, my englis is not good.

Best Answer

C = nchoosek(1:28,4);
To save please read the documentation on save
doc save %-ascii option
Alternatively
doc dlmwrite
Please accept the answer that best solves your problem.