Execution of script nchoosek as a function is not supported
조회 수: 2 (최근 30일)
이전 댓글 표시
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
2022년 4월 26일
Please don't use an answer to make a comment and a followup to the answer you got.
답변 (1개)
Bruno Luong
2022년 4월 26일
편집: Bruno Luong
2022년 4월 26일
Please do that
which nchoosek
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
Bruno Luong
2022년 4월 26일
편집: Bruno Luong
2022년 4월 26일
@David Rann when you edit it
edit('/MATLAB/toolbox/matlab/specfun/nchoosek.m')
can you see the first line with "function c = nchoosek(v,k)"
If not it looks like the original file is corrupted.
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!