필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to these permutations?

조회 수: 1 (최근 30일)
S. David
S. David 2012년 5월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
Suppose I have a vector of N elements, and I need to find all possible permutations {N \choose n} for n=1,2, ..., N. How can I do that?
Example: Suppose I have the vector [1 2 3], then all possible permutations are: 123 (n=3), 12, 13, 23, (n=2), 1, 2, 3 (n=1)
Thanks
  댓글 수: 2
Oleg Komarov
Oleg Komarov 2012년 5월 27일
doc nchoosek
S. David
S. David 2012년 5월 28일
I did not know it is built-in in MATLAB. Thanks

답변 (1개)

Junaid
Junaid 2012년 5월 27일
Take a look over this link. This might be useful for you.
  댓글 수: 1
S. David
S. David 2012년 5월 28일
It is not working. I do not know why. I think choosek does the job. Thanks anyway

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by