title: Using MATLAB, how can I find the integral of a bounded CDF?
body: <p>Using MATLAB, I am trying to find the integral of a bounded range of a CDF.  Please refer to the following code:</p>
  
  <pre><code>u = 1;
  s = 1;
  X = random('Normal',u,s,1,10000);
  pd = makedist('Normal','mu',u,'sigma',s);
  xAxis = min(X):.0001:max(X);
  c_pd = cdf(pd,xAxis);
  r = icdf(pd,[.3,.6]);
  plot(xAxis,c_pd)
  </code></pre>
  
  <p>Basically, I am trying to integrate c_pd between the corresponding X values for .3 and .6 (found by using icdf).  However, c_pd is a vector and not the actual cdf function.  Does anyone have ideas on how I can find the integral of this regardless of the distribution type (i.e. Normal, Rician, etc.)?  Please advise.  Thank you.</p>