フィルターのクリア

Execution of script nchoosek as a function is not supported

1 回表示 (過去 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 件のコメント
Bruno Luong
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
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 ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by