]> gitweb.michael.orlitzky.com - octave.git/blobdiff - partition.m
Move homework #1's octave code into its directory.
[octave.git] / partition.m
diff --git a/partition.m b/partition.m
deleted file mode 100644 (file)
index 96ded5e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-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.
-  ##
-  ##
-
-  ## 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];
-end