No BSD License  

Highlights from
An Introduction to Stochastic Processes

image thumbnail
[w]=binomial(n,m)
function [w]=binomial(n,m)
%
if m <= n
x=1:n; x=cumprod(x); x=x(1,n);
if m==0
y=1;
else
y=1:m; y=cumprod(y); y=y(1,m);
end
if (n==m)
z=1;
else
z=1:n-m; z=cumprod(z); z=z(1,n-m);
end
w=x/(y*z);
else
w=0;
end

Contact us at files@mathworks.com