nchoose2

all combinations of two elements

Download
Download

You are now following this Submission

Cite As

Jos (10584) (2026). nchoose2 (https://se.mathworks.com/matlabcentral/fileexchange/20144-nchoose2), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: nCtwo

Inspired: nchoose3, VChooseK

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
3.2.0

added image

Download
3.2.0-0

edited internal comments

Download
3.1.0

fixed bug for scalar input

Download
3.0.0

When X is a scalar integer > 1, it returns X*(X-1)/2.

Download
2.2.0

checked for R2017b, fixed comma's

Download
1.0.0

fixed error with input having less than 2 elements

Download