title: Maximum of a fitted Gaussian in MATLAB
body: <p>I need to find the maximum of a Gaussian I have fitted, below is my sample code (ignore the fact that it is a horrible fit to the Gaussian, they were just two spare matrices I had kicking around in my variables tray)</p>
  
  <pre><code>x=[10;2;6;1;7;5;3;4;8;9];
  z1=[0;0;0;0;0;6;7;8;9;10];
  cf1=fit(x,z1,'gauss1');
  plot(x,z1,'.k')
  hold on
  plot(cf1,'r')
  </code></pre>
  
  <p>Any help you guys could give me would be greatly appreciated.</p>