Re: Octave interface to gsl_deriv for finite differences with adaptivestep size
"Michael Creel" <[email protected]> Wed, 16 Aug 2006 01:59:22 +0200
| Newsgroups | gmane.comp.gnu.octave.sources |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_229209_27330573.1155686362468 Content-Type: multipart/alternative; boundary="----=_Part_229210_18329643.1155686362468" ------=_Part_229210_18329643.1155686362468 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, The numgradient function in octave-forge does central difference numeric gradient using an adaptive stepsize. The attached script shows that it gets the derivative of the difficult function in the cited paper correct to the 5th decimal place. Does the gsl version do better? Cheers, Michael On 8/15/06, Paul Koufalas <[email protected]> wrote: > > G'day all, > > Please find attached an Octave interface to the GSL numerical > differentiation function gsl_deriv(). This interface provides an > adaptive step size forward difference approximation to the gradient of a > vector-valued function. Compile it using > > mkoctfile -v gsl_deriv.cc -lgsl > > For an relevant article on the topic, see > http://www.nezumi.demon.co.uk/consult/deriv.htm > > Cheers, > Paul. > > > > > _______________________________________________ > Octave-sources mailing list > [email protected] > https://www.cae.wisc.edu/mailman/listinfo/octave-sources > > > > ------=_Part_229210_18329643.1155686362468 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,<br>The numgradient function in octave-forge does central difference numeric gradient using an adaptive stepsize. The attached script shows that it gets the derivative of the difficult function in the cited paper correct to the 5th decimal place. Does the gsl version do better? <br>Cheers, Michael<br><br><div><span class="gmail_quote">On 8/15/06, <b class="gmail_sendername">Paul Koufalas</b> <<a href="mailto:[email protected]">[email protected]</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> G'day all,<br><br>Please find attached an Octave interface to the GSL numerical<br>differentiation function gsl_deriv(). This interface provides an<br>adaptive step size forward difference approximation to the gradient of a <br>vector-valued function. Compile it using<br><br>mkoctfile -v gsl_deriv.cc -lgsl<br><br>For an relevant article on the topic, see<br><a href="http://www.nezumi.demon.co.uk/consult/deriv.htm">http://www.nezumi.demon.co.uk/consult/deriv.htm </a><br><br>Cheers,<br>Paul.<br><br><br><br><br>_______________________________________________<br>Octave-sources mailing list<br><a href="mailto:[email protected]">[email protected]</a><br><a href="https://www.cae.wisc.edu/mailman/listinfo/octave-sources"> https://www.cae.wisc.edu/mailman/listinfo/octave-sources</a><br><br><br><br></blockquote></div><br> ------=_Part_229210_18329643.1155686362468-- ------=_Part_229209_27330573.1155686362468 Content-Type: application/octet-stream; name=test_numgradient.m Content-Transfer-Encoding: base64 X-Attachment-Id: f_eqwxt777 Content-Disposition: attachment; filename="test_numgradient.m" MTsKZnVuY3Rpb24gYT1mKHgpCglhID0gc2luKDEveCk7CmVuZGZ1bmN0aW9uCgpiID0gbnVtZ3Jh ZGllbnQoImYiLCB7MC4xMX0pOwpwcmludGYoIiVmMTZcbiIsYik7 ------=_Part_229209_27330573.1155686362468 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Octave-sources mailing list [email protected] https://www.cae.wisc.edu/mailman/listinfo/octave-sources ------=_Part_229209_27330573.1155686362468--