How to reinstall Optimization Toolbox in MATLAB？
<p>I call Matlab built-in function <code>fminunc</code> by</p>

<pre><code>[b,fun,flag]    = fminunc(@cov,b0);
</code></pre>

<p>in the debug mode. The softwoare throw me a <code>"Reference to non-existent field"</code> error</p>

<pre><code>Reference to non-existent field 'DiffMinChange'.

Error in optimget&gt;optimgetfast (line 102)
    value = options.(name);

Error in optimget (line 25)
    o = optimgetfast(options,name,default);

Error in fminunc (line 201)
options.DiffMinChange = optimget(options,'DiffMinChange',defaultopt,'fast');
</code></pre>

<p>People in the Mathworks forum suggest me re-hash the toolbox by
<a href="https://www.mathworks.com/matlabcentral/answers/312355-error-failure-in-initial-user-supplied-objective-function-evaluation-when-using-fminunc" rel="nofollow noreferrer">https://www.mathworks.com/matlabcentral/answers/312355-error-failure-in-initial-user-supplied-objective-function-evaluation-when-using-fminunc</a></p>

<pre><code>rehash toolboxcache
</code></pre>

<p>But it seems not work. Another way is to reinstall the Optimization Toolbox, but I don't know how to do this, especially how to do this in an effective way. Any suggestion?</p>