combvec
벡터의 모든 조합 생성
설명
예제
combvec
함수를 사용하여 벡터의 모든 조합 생성하기
이 예제에서는 두 개의 행렬 즉, a1
과 a2
의 모든 조합이 포함된 행렬을 생성하는 방법을 보여줍니다.
두 개의 입력 행렬 a1
과 a2
를 생성합니다. 그런 다음 combvec
함수를 호출하여 가능한 모든 조합을 생성합니다.
a1 = [1 2 3; 4 5 6]; a2 = [7 8; 9 10]; a3 = combvec(a1,a2)
a3 = 1 2 3 1 2 3 4 5 6 4 5 6 7 7 7 8 8 8 9 9 9 10 10 10
입력 인수
A1
— 입력 행렬 1
행렬
모든 조합을 계산할 입력 행렬로, N1
개의 열 벡터를 갖는 행렬로 지정됩니다.
A2
— 입력 행렬 2
행렬
모든 조합을 계산할 입력 행렬로, N2
개의 열 벡터를 갖는 행렬로 지정됩니다.
출력 인수
A
— 출력 행렬
행렬
출력 행렬로, (N1*N2*...)
개의 열 벡터로 구성된 행렬로 반환됩니다. 여기서 열은 각각의 입력값 Ai
에서 하나씩 가져온 열 벡터들을 조합해 구한 모든 조합으로 구성됩니다.
버전 내역
R2006a 이전에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)