o minimize it using <tt>fminsearch</tt>.</p><pre class="codeinput">[tmin,ssmin]=fminsearch(ssfun,[0.15;100],[],data)
n = length(data.xdata);
p = 2;
mse = ssmin/(n-p) <span class="comment">% estimate for the error variance</span>
</pre><pre class="codeoutput">
tmin =

      0.14542
       49.053


ssmin =

   0.00081677


mse =

   0.00016335

</pre><p>The Jacobian matrix of the model function is easy to calculate so we use it to produce estimate of the covariance of theta. This can be used as the initial pr