How can I create a script that calculates this combinatorial?

回答 (1 件)

Vladimir Sovkov
Vladimir Sovkov 2020 年 8 月 23 日

0 投票

C=nchoosek(n,r)

2 件のコメント

Carlos Siles Rivero
Carlos Siles Rivero 2020 年 8 月 23 日
I managed to solve it with a "for", I hope I can help someone
Vladimir Sovkov
Vladimir Sovkov 2020 年 8 月 24 日
Here you compute but not the binomial coefficient . Is this what you really want? Otherwise, what stops you from using the inbuilt function nchoosek, which is much more efficient than any loop construction can be?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2020 年 8 月 23 日

コメント済み:

2020 年 8 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by