Error for function permutation with repetition.

조회 수: 8 (최근 30일)
Clarisha Nijman
Clarisha Nijman 2019년 2월 10일
댓글: Clarisha Nijman 2019년 2월 10일
Dear all,
I am using matlab 2016b and try to find al the permutations with repetition. But it gives me an error saying: Undefined function or variable 'permn'.
So I wonder, what is missing in is my code is there another function/code needed for my version of matlab?
This is the code:
%Find all possible prob
I=0:200;
M = permn(I,3);
Can I have some feedback please?
Thank you in advance
  댓글 수: 2
madhan ravi
madhan ravi 2019년 2월 10일
You mean perms() ?
Clarisha Nijman
Clarisha Nijman 2019년 2월 10일
No, I do not think so. It gives me another error: Error using perms
Too many input arguments.
Lets take a small example: I=3:6 and I want to have permutations of 3 with repetition: We should have a list with 4^3 possible outcomes. Some of them are:
3 3 3, 3 3 4, 3 3 5, 3 3 6, 3 4 3, 3 4 4, 3, 4 5, 3 4 6, ......., 6 6 3, 6 6 4, 6 6 5, 6 6 6.

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

채택된 답변

Walter Roberson
Walter Roberson 2019년 2월 10일
  댓글 수: 3
madhan ravi
madhan ravi 2019년 2월 10일
You have to download it and then use it.
Clarisha Nijman
Clarisha Nijman 2019년 2월 10일
Ok like that!!! Thanks a lot!!!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by