]> gitweb.michael.orlitzky.com - octave.git/blobdiff - has_root.m
First shot at a solve_poisson function.
[octave.git] / has_root.m
old mode 100755 (executable)
new mode 100644 (file)
index 5c835d8..ffd9666
@@ -1,5 +1,3 @@
-#!/usr/bin/octave --silent
-
 function has_root = has_root(fa, fb)
   ## Use the intermediate value theorem to determine whether or not some
   ## function has an odd number of roots on an interval. If the function
@@ -9,7 +7,19 @@ function has_root = has_root(fa, fb)
   ## Call the function whose roots we're concerned with 'f'. The two
   ## parameters `fa` and `fb` should correspond to f(a) and f(b).
   ##
-
+  ##
+  ## INPUTS:
+  ##
+  ##   * ``fa`` - The value of `f` at one end of the interval.
+  ##
+  ##   * ``fb`` - The value of `f` at the other end of the interval.
+  ##
+  ## OUTPUTS:
+  ##
+  ##  * ``has_root`` - True if we can use the I.V.T. to conclude that
+  ##    there is a root on [a,b], false otherwise.
+  ##
+  
   ## If either f(a) or f(b) is zero, the product of their signs will be
   ## zero and either a or b is a root. If the product of their signs is
   ## negative, then f(a) and f(b) are non-zero and have opposite sign,