]> gitweb.michael.orlitzky.com - octave.git/blobdiff - partition.m
Revert "Return a more-useful column vector from partition();"
[octave.git] / partition.m
index 96ded5e194103e5a5ecaf92b0203ad74b97a87f7..99e38921d8d5c103b026ad9f9b0e9d98608bf3ac 100644 (file)
@@ -1,27 +1,27 @@
 function [p,delta] = partition(integerN, a, b)
-  ## Partition the interval [a,b] into integerN subintervals. We do not
-  ## requite that a<b.
-  ##
-  ## INPUTS:
-  ##
-  ##   * integerN - The number of subintervals.
-  ##
-  ##   * a - The "left" 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.
-  ##
-  ##   * delta - The distance between x_i and x_{i+1} in the partition.
-  ##
-  ##
+  % Partition the interval [a,b] into integerN subintervals. We do not
+  % require that a<b.
+  %
+  % INPUTS:
+  %
+  %   * ``integerN`` - The number of subintervals.
+  %
+  %   * ``a`` - The "left" 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.
+  %
+  %   * ``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`.
+  % 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;
 
   p = [a : delta : b];