Undefined function 'combntns' for input arguments of type 'double'.

조회 수: 7 (최근 30일)
Khairul nur
Khairul nur 2021년 3월 3일
댓글: 超锋 王 2021년 7월 20일
Hi all,
i looking any matlab function that can calculate 'combination' such as (3 C 2) =3.
There is a matlab function for (5 C 3)=10, but returns errors as following. Please help me to suggest
combos = combntns(1:5,3)
error:
Undefined function 'combntns' for input arguments of type 'double'.

채택된 답변

Walter Roberson
Walter Roberson 2021년 3월 3일
https://www.mathworks.com/help/map/ref/combntns.html
the function is part of the Mapping Toolbox. Use nchoosek instead.
  댓글 수: 2
Khairul nur
Khairul nur 2021년 3월 3일
i tried it..works for me! thank you for the suggestion :)
超锋 王
超锋 王 2021년 7월 20일
combntns([1 2 3 4 5 6 7 8 9 10 11],9)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by