Execution of script nchoosek as a function is not supported

조회 수: 5(최근 30일)
David
David 2022년 4월 26일
댓글: Stephen23 2022년 4월 27일
I am trying to use the nchoosek function and I get this error "Execution of script nchoosek as a function is not supported".
I am entering:
b = nchoosek(5,4)
Thanks for any help!
  댓글 수: 1
John D'Errico
John D'Errico 2022년 4월 26일
Please don't use an answer to make a comment and a followup to the answer you got.

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

답변(1개)

Bruno Luong
Bruno Luong 2022년 4월 26일
편집: Bruno Luong 2022년 4월 26일
Please do that
which nchoosek
/MATLAB/toolbox/matlab/specfun/nchoosek.m
you must find somewhere similar to the above or this
C:\Program Files\MATLAB\R2022a\toolbox\matlab\specfun\nchoosek.m
You probably shadow the stock function (get different result).
  댓글 수: 3
Stephen23
Stephen23 2022년 4월 27일
"When I enter "which nchoosek" I get the current file path."
That does not sound good: do you have a script named NCHOOSEK ? What is the current path?
Please show us what this command prints:
which nchoosek -all

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by