title: How to fit gaussian with Matlab with given height
body: <p>I am currently unable to have accurate gaussian fit. How can I fix the height? (see picture).</p>
  
  <pre><code>ft=fit(x,y,'gauss2') 
  Co=coeffvalues(ft)
  sigma=Co(3)/sqrt(2)  
  mu = Co(2)
  C=Co(1)
  
  plot(X,C*exp(-(X - mu).^2 / (2*sigma^2))+min(y), '-r') 
  </code></pre>