How can I create a script that calculates this combinatorial?

Answers (1)

C=nchoosek(n,r)

2 Comments

I managed to solve it with a "for", I hope I can help someone
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?

Sign in to comment.

Categories

Asked:

on 23 Aug 2020

Commented:

on 24 Aug 2020

Community Treasure Hunt

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

Start Hunting!