<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262521</link>
    <title>MATLAB Central Newsreader - Improving precision in fminunc</title>
    <description>Feed for thread: Improving precision in fminunc</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 07 Oct 2009 13:08:01 -0400</pubDate>
      <title>Improving precision in fminunc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262521#685322</link>
      <author>Mads </author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I am trying to minimize a non-linear function in two varibles. To test whether it works, I have tried using a function to which I know the solution. When my starting guess IS the solution, fminunc of course returns the starting guess as it should. However, when I vary the starting guess just slightly, the precision of the result is bad. Is there a way to increase the precision of the result?&lt;br&gt;
&lt;br&gt;
Best regards and thanks a lot!&lt;br&gt;
&lt;br&gt;
Mads</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 00:02:00 -0400</pubDate>
      <title>Re: Improving precision in fminunc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262521#685466</link>
      <author>Marcus M. Edvall</author>
      <description>You can setup the problem with tomSym, as per this page for example:&lt;br&gt;
&lt;a href=&quot;http://tomsym.com/nlp_programming_matlab.html&quot;&gt;http://tomsym.com/nlp_programming_matlab.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Then 1st and 2nd order derivatives will be generated automatically and&lt;br&gt;
your precision will become the best it can be.&lt;br&gt;
&lt;br&gt;
Best wishes, Marcus&lt;br&gt;
&lt;a href=&quot;http://tomopt.com/&quot;&gt;http://tomopt.com/&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://tomdyn.com/&quot;&gt;http://tomdyn.com/&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 12:02:06 -0400</pubDate>
      <title>Re: Improving precision in fminunc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262521#685605</link>
      <author>Alan Weiss</author>
      <description>Mads wrote:&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am trying to minimize a non-linear function in two varibles. To test whether it works, I have tried using a function to which I know the solution. When my starting guess IS the solution, fminunc of course returns the starting guess as it should. However, when I vary the starting guess just slightly, the precision of the result is bad. Is there a way to increase the precision of the result?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Best regards and thanks a lot!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Mads&lt;br&gt;
There are some ideas on improving results here:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
In particular, try changing to central finite differences&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544um-1&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544um-1&lt;/a&gt;&lt;br&gt;
or, even better, supply a gradient and Hessian if you can&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544vw-1&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544vw-1&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544qb-1&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br544qb-1&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Of course, you can always fool around with tolerances&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br5440b-1&quot;&gt;http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/br44i2r.html#br5440b-1&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Alan Weiss&lt;br&gt;
MATLAB mathematical toolbox documentation</description>
    </item>
  </channel>
</rss>

