|
|
| File Information |
| Description |
NCHOOSE2 - all combinations of two elements
Y = NCHOOSE2(X) returns all combinations of two elements of the array X. It is the fast, vectorized version of NCHOOSEK(X,2). X can be any type of array.
Example:
nchoose2([10 20 30 40])
% -> 10 20
% 10 30
% 10 40
% 20 30
% 20 40
% 30 40
nchoose2({'a','b','c','d','e'})
% -> 'a' 'b'
% 'a' 'c'
% ...
% 'c' 'e'
% 'd' 'e'
See also nchoosek, perms
combn, nchoose, allcomb (on the File Exchange)
(v2.0, may 2008) |
| Acknowledgements |
N Ctwo
inspired this file.
This file inspired
V Choose K.
|
| MATLAB release |
MATLAB 7 (R14)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (6) |
| 16 Dec 2009 |
Jan Simon
|
|
|
| 11 Jun 2008 |
David S
|
|
|
| 06 Jun 2008 |
m p
|
|
|
| 03 Jun 2008 |
Jos (author)
|
|
|
| 02 Jun 2008 |
Urs (us) Schwarz
|
|
|
| 02 Jun 2008 |
Urs (us) Schwarz
|
|
|
| Updates |
| 03 Jun 2008 |
fixed error with input having less than 2 elements |
|
Contact us