]> gitweb.michael.orlitzky.com - octave.git/blobdiff - partition.m
Add trigonometric functions and their tests.
[octave.git] / partition.m
index ac616cf5891d6f0e7c2f3d4322b8ab22b383e705..a08423671716d741302f67944344e3fbf76236db 100644 (file)
@@ -1,28 +1,28 @@
 function [p,delta] = partition(integerN, a, b)
   ## Partition the interval [a,b] into integerN subintervals. We do not
-  ## requite that a<b.
+  ## require that a<b.
   ##
   ## INPUTS:
   ##
-  ##   * integerN - The number of subintervals.
+  ##   * ``integerN`` - The number of subintervals.
   ##
-  ##   * a - The "left" endpoint of the interval to partition.
+  ##   * ``a`` - The "left" endpoint of the interval to partition.
   ##
-  ##   * b - The "right" endpoint of the interval to partition.
+  ##   * ``b`` - The "right" endpoint of the interval to partition.
   ##
   ##
   ## OUTPUTS:
   ##
-  ##   * p - The resulting partition, as a vector of length integerN+1.
+  ##   * ``p`` - The resulting partition, as a vector of length integerN+1.
   ##
-  ##   * delta - The distance between x_i and x_{i+1} in the partition.
+  ##   * ``delta`` - The distance between x_i and x_{i+1} in the partition.
   ##
   ##
 
   ## We don't use abs() here because `b` might be less than `a`. In that
   ## case, we want delta negative so that when we add it to `a`, we move
   ## towards `b`.
-  delta = (b - a)/integerN
+  delta = (b - a)/integerN;
 
-  p = [a : delta : b]
+  p = [a : delta : b];
 end