nchoose3

버전 1.0.2 (2.54 KB) 작성자: Sebastian Schlecht
All combinations of three elements.
다운로드 수: 16
업데이트 날짜: 2018/12/12

NCHOOSE3 - all combinations of three elements
Y = NCHOOSE3(X) returns all combinations of three elements of the array X.
It is the fast, vectorized version of NCHOOSEK(X,3). X can be any type
of array. When X is a scalar integer > 1, it returns X*(X-1)*(X-2)/6.

Example:
nchoose3([10 20 30 40 50])
% -> 10 20 30
% 10 20 40
% 10 20 50
% 10 30 40
% 10 30 50
% 10 40 50
% 20 30 40
% 20 30 50
% 20 40 50
% 30 40 50

nchoose3({'a','b','c','d','e'})
% -> {'a'} {'b'} {'c'}
% {'a'} {'b'} {'d'}
% {'a'} {'b'} {'e'}
% {'a'} {'c'} {'d'}
% {'a'} {'c'} {'e'}
% {'a'} {'d'} {'e'}
% {'b'} {'c'} {'d'}
% {'b'} {'c'} {'e'}
% {'b'} {'d'} {'e'}
% {'c'} {'d'} {'e'}

See also NCHOOSEK, PERMS, NEXTPERM
NCHOOSE2, PERMN, NCHOOSE, ALLCOMB (on the File Exchange)

version 1.0 (Wednesday, 12. December 2018)
(c) Sebastian J. Schlecht
https://www.sebastianjiroschlecht.com/

Heavily inspired by NCHOOSE2 by
(c) Jos van der Geest
email: samelinoa@gmail.com
http://www.mathworks.nl/matlabcentral/fileexchange/authors/10584

인용 양식

Sebastian Schlecht (2024). nchoose3 (https://github.com/SebastianJiroSchlecht/nchoose3), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Software Development Tools에 대해 자세히 알아보기
도움

받음: nchoose2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.2

fix in description

1.0.1

add description

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.