title: fitting gaussian distribution to data
body: <p>I have a vector <code>y</code> containing 1440 values (values are between 0-1) that looks like a Gaussian distribution.
  Therefore I would like to find the best fitting gaussian distribution to have a model.</p>
  
  <pre><code>x=1:1440;
  [sigma_,mu_] = gaussfit(x,y);
  norm = normpdf(x,mu_,sigma_);
  </code></pre>
  
  <p>My problem is that the values in norm are way smaller than the values in <code>y</code>, i.e. value in <code>norm</code> are of the order of <code>10-3</code> while values in y are between <code>0 1</code>.</p>
  
  <p>I have then to add an extra step in order to normalize between 0 and 1 the  values in norm.</p>
  
  <pre><code>norm_data = (norm - min(norm)) / ( max(norm) - min(norm) );
  </code></pre>
  
  <p>Is my procedure correct? (estimation of sigma and mu, normpdf, normalization)
  Is there a way to get directly a fit to the original data expressing the probability?</p>
  
  <p><code>y</code> can be downloaded <a href="https://drive.google.com/file/d/0B3vXKJ_zYaCJQmx6S3h3Z3IzWUE/view?usp=sharing" rel="nofollow">here</a></p>