No BSD License  

Highlights from
binomial.m

1.0

1.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 475 Bytes File ID: #4901

binomial.m

by David Terr

 

11 May 2004 (Updated 04 Jun 2004)

This program computes the binomial coefficient C(n,m).

| Watch this File

File Information
Description

Given nonnegative integers m and n with m <= n, this program computes the binomial coefficient C(n,m). It's about time someone wrote code to do this! I couldn't find it anywhere.

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
24 May 2004 Jos vdG

lookfor "binomial coefficient" returns
NCHOOSEK

17 Sep 2005 B Hill

nchoosek works fine. This function only appears to support numeric calculation. Remove post from "Symoblic Math" section as it does not belong here.

24 May 2006 Mark Pijnenburg

Indeed this function does not work for symbolic computations so should be removed from this list. It works for numerical computations but for this there are better alternatives, e.g. nchoosek or other.

Please login to add a comment or rating.
Updates
04 Jun 2004

Greg von Winckel sent me another version, which although not as accurate is much faster for large input, so I use his version when n>100.

Tag Activity for this File
Tag Applied By Date/Time
symbolic math David Terr 22 Oct 2008 07:19:37
binomial coefficient David Terr 22 Oct 2008 07:19:37
integers David Terr 22 Oct 2008 07:19:37
nonnegative David Terr 22 Oct 2008 07:19:37
binomial coefficient Lothar Kleinod 20 Aug 2010 05:18:29

Contact us at files@mathworks.com