In "nchoosek" function, how to do some of elements of matrix are the same?

the title just is question.
I want to get including that

댓글 수: 2

nchoosek picks the elements if they are same also...
i don't know whats mean. as if A=[6 6 7 7 9 11 13]. same things are 6 and 7.

댓글을 달려면 로그인하십시오.

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2017년 9월 19일
>> nchoosek(A,2)
ans =
6 6
6 7
6 7
6 9
6 11
6 13
6 7
6 7
6 9
6 11
6 13
7 7
7 9
7 11
7 13
7 9
7 11
7 13
9 11
9 13
11 13
>> nchoosek(unique(A),2)
ans =
6 7
6 9
6 11
6 13
7 9
7 11
7 13
9 11
9 13
11 13
>>

카테고리

도움말 센터 및 File Exchange에서 수학에 대해 자세히 알아보기

질문:

2017년 9월 19일

답변:

2017년 9월 19일

Community Treasure Hunt

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

Start Hunting!