]> gitweb.michael.orlitzky.com - octave.git/blobdiff - legendre_p_tilde.m
Add the powell_hessian() and powell_hessian1() functions.
[octave.git] / legendre_p_tilde.m
index 0b3a87ba698dc41c560cc0b38c52b4549a8348e8..2c9d2ab08916107fe11ca42ba863f32e4341117f 100644 (file)
@@ -1,7 +1,7 @@
 function P_tilde = legendre_p_tilde(n, a, b)
-  ## Return the nth Legendre polynomial scaled to the interval [a,b].
+  ## Return the `n`th Legendre polynomial scaled to the interval [a,b].
   ##
-  ## INPUTS:
+  ## INPUT:
   ##
   ##   * ``n`` - The index of the polynomial that we want.
   ##
@@ -9,7 +9,7 @@ function P_tilde = legendre_p_tilde(n, a, b)
   ##
   ##   * ``b`` - The right endpoint of the interval.
   ##
-  ## OUTPUTS:
+  ## OUTPUT:
   ##
   ##   * ``P_tilde`` - A polynomial function of one argument.
   ##
@@ -17,7 +17,8 @@ function P_tilde = legendre_p_tilde(n, a, b)
     ## Can't do anything here. Return nothing.
     P = NA;
   else
-    ## Compute the Legendre polynomial over [-1,1] and mangle it.
+    ## Compute the Legendre polynomial over [-1,1] and mangle it to fit
+    ## the interval [a,b].
     P = legendre_p(n);
     P_tilde = @(x) P( (2/(b-a)).*x + 1 - (2*b)/(b-a) );
   end