]> gitweb.michael.orlitzky.com - octave.git/blobdiff - legendre_p_tilde.m
Check for error flag in rank_k_approximation().
[octave.git] / legendre_p_tilde.m
index 2c9d2ab08916107fe11ca42ba863f32e4341117f..3bb30be664003fcab28ca19259d7b8f4821f045b 100644 (file)
@@ -1,24 +1,24 @@
 function P_tilde = legendre_p_tilde(n, a, b)
-  ## Return the `n`th Legendre polynomial scaled to the interval [a,b].
-  ##
-  ## INPUT:
-  ##
-  ##   * ``n`` - The index of the polynomial that we want.
-  ##
-  ##   * ``a`` - The left endpoint of the interval.
-  ##
-  ##   * ``b`` - The right endpoint of the interval.
-  ##
-  ## OUTPUT:
-  ##
-  ##   * ``P_tilde`` - A polynomial function of one argument.
-  ##
+  % Return the `n`th Legendre polynomial scaled to the interval [a,b].
+  %
+  % INPUT:
+  %
+  %   * ``n`` - The index of the polynomial that we want.
+  %
+  %   * ``a`` - The left endpoint of the interval.
+  %
+  %   * ``b`` - The right endpoint of the interval.
+  %
+  % OUTPUT:
+  %
+  %   * ``P_tilde`` - A polynomial function of one argument.
+  %
   if (n < 0)
-    ## Can't do anything here. Return nothing.
+    % Can't do anything here. Return nothing.
     P = NA;
   else
-    ## Compute the Legendre polynomial over [-1,1] and mangle it to fit
-    ## the interval [a,b].
+    % 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