nCtwo
Version 1.0.0.0 (1.54 KB) by
Simone Scaringi
All combinations of N elements taken two at the time.
Usage - vec=nCtwo(dat) where dat is a vector of length N, produces a matrix with N*(N-1)/2 rows and 2 columns. Each row of the result vec has two of the elements in the vector dat. Similar to the MATLAB function NCHOOSEK(dat,2) but much faster.
Cite As
Simone Scaringi (2026). nCtwo (https://uk.mathworks.com/matlabcentral/fileexchange/20110-nctwo), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Linear Algebra >
Find more on Linear Algebra in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
