]> gitweb.michael.orlitzky.com - octave.git/commitdiff
Revert "Return a more-useful column vector from partition();"
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 7 May 2013 19:06:19 +0000 (15:06 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 7 May 2013 19:06:19 +0000 (15:06 -0400)
This reverts commit fde7b1beb7c103ba562f35d27586c1b4d77eae75.

partition.m

index ec1bc8bec617ab1e450a6f502157ce6e91cdc85e..99e38921d8d5c103b026ad9f9b0e9d98608bf3ac 100644 (file)
@@ -2,7 +2,7 @@ function [p,delta] = partition(integerN, a, b)
   % Partition the interval [a,b] into integerN subintervals. We do not
   % require that a<b.
   %
   % Partition the interval [a,b] into integerN subintervals. We do not
   % require that a<b.
   %
-  % INPUT:
+  % INPUTS:
   %
   %   * ``integerN`` - The number of subintervals.
   %
   %
   %   * ``integerN`` - The number of subintervals.
   %
@@ -10,13 +10,12 @@ function [p,delta] = partition(integerN, a, b)
   %
   %   * ``b`` - The "right" endpoint of the interval to partition.
   %
   %
   %   * ``b`` - The "right" endpoint of the interval to partition.
   %
-  % OUTPUT:
   %
   %
-  %   * ``p`` - The resulting partition, as a column vector of length
-  %   integerN+1.
+  % OUTPUTS:
   %
   %
-  %   * ``delta`` - The distance between x_i and x_{i+1} in the
-  %   partition.
+  %   * ``p`` - The resulting partition, as a vector of length integerN+1.
+  %
+  %   * ``delta`` - The distance between x_i and x_{i+1} in the partition.
   %
   %
 
   %
   %
 
@@ -25,5 +24,5 @@ function [p,delta] = partition(integerN, a, b)
   % towards `b`.
   delta = (b - a)/integerN;
 
   % towards `b`.
   delta = (b - a)/integerN;
 
-  p = [a : delta : b]';
+  p = [a : delta : b];
 end
 end