changeset 8714:b6a3df90365b octave-forge

deriv: update of help text and use of texinfo
author carandraug
date Mon, 31 Oct 2011 16:58:07 +0000
parents 3ca251e533a7
children 3ed012a0f558
files main/optim/inst/deriv.m
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/optim/inst/deriv.m	Mon Oct 31 16:49:53 2011 +0000
+++ b/main/optim/inst/deriv.m	Mon Oct 31 16:58:07 2011 +0000
@@ -12,10 +12,19 @@
 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 ## for more details.
 
-## deriv(f,x0[,h,O,N])
-
-## Reference -> Numerical Methods for Mathematics, Science, and
-## Engineering by John H. Mathews.
+## -*- texinfo -*-
+## @deftypefn {Function File} {dx =} deriv (@var{f}, @var{x0})
+## @deftypefnx {Function File} {dx =} deriv (@var{f}, @var{x0}, @var{h})
+## @deftypefnx {Function File} {dx =} deriv (@var{f}, @var{x0}, @var{h}, @var{O})
+## @deftypefnx {Function File} {dx =} deriv (@var{f}, @var{x0}, @var{h}, @var{O}, @var{N})
+## Calculate derivate of function @var{f}.
+##
+## @var{f} must be a function handle and @var{x0} a scalar.The optional arguments
+## @var{h}, @var{O} and @var{N} default to 1e-7, 2, and 1 respectively.
+##
+## Reference: Numerical Methods for Mathematics, Science, and Engineering by
+## John H. Mathews.
+## @end deftypefn
 
 function dx = deriv (f, x0, h = 0.0000001, O = 2, N = 1)