title: How to use erf to calculate a probability in matlab?
body: <p>Given a min and max value as well as the N number of items, I need to calculate the probability that the total sum of N items will be greater than or equal to an inputted value LM. The function handle:</p>
  
  <pre><code>function Pr = LoadPr(Wmin,Wmax,N,LM)
  </code></pre>
  
  <p>Another function:</p>
  
  <pre><code>function [muL, sigmaL, L ] = plane(Wmin,Wmax,N,M)
      [muW,sigmaW] = package(Wmin,Wmax);
      //  This calculates mu and sigma for a single item
      muL = muW*N;
      sigmaL = sigmaW*N^0.5;
      L = normrnd(muL,sigmaL,1,M);
  end
  </code></pre>
  
  <p>This function calculates mu and sigma as well  as L is an 1 x M
  array of randomly generated numbers that simulate M outcomes of randomly generated outcomes using sigmaL and muL given similar arguments as the previous function.</p>
  
  <p>I also want to utilize the erf and/or erfc functions. 
  An example: </p>
  
  <pre><code>Wmin = 2; Wmax = 10; N = 10000; LM = 60400;
  Pr = LoadPr(Wmin,Wmax,N,LM )
  Pr =
      0.0416
  </code></pre>
  
  <p>Thanks!</p>