matlab: binomial distribution
I need to calculate the probability mass function, and cumulative distribution function, of the [binomial distribution][1]. I would like to use MATLAB to do this (raw MATLAB, no toolboxes). I can calculate these myself, but was hoping to use a predefined function + can't find any. Is there something out there?

    function x = homebrew_binomial_pmf(N,p)
        x = [1];
        for i = 1:N
           x = [0 x]*p + [x 0]*(1-p);
        end
    


  [1]: http://en.wikipedia.org/wiki/Binomial_distribution
matlab: binomial distribution
===

I need to calculate the probability mass function, and cumulative distribution function, of the [binomial distribution][1]. I would like to use MATLAB to do this (raw MATLAB, no toolboxes). I can calculate these myself, but was hoping to use a predefined function + can't find any. Is there something out there?

    function x = homebrew_binomial_pmf(N,p)
        x = [1];
        for i = 1:N
           x = [0 x]*p + [x 0]*(1-p);
        end
    


  [1]: http://en.wikipedia.org/wiki/Binomial_distribution