nCtwo

All combinations of N elements taken two at the time.

Vous suivez désormais cette soumission

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.

Citation pour cette source

Simone Scaringi (2026). nCtwo (https://fr.mathworks.com/matlabcentral/fileexchange/20110-nctwo), MATLAB Central File Exchange. Extrait(e) le .

Remerciements

A inspiré : nchoose2, VChooseK

Catégories

En savoir plus sur Linear Algebra dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0