]> gitweb.michael.orlitzky.com - octave.git/blobdiff - solve_poisson.m
Add the partition function.
[octave.git] / solve_poisson.m
diff --git a/solve_poisson.m b/solve_poisson.m
new file mode 100644 (file)
index 0000000..be1b1ec
--- /dev/null
@@ -0,0 +1,17 @@
+function u = solve_poisson(integerN, f)
+  ##
+  ## Numerically solve the poisson equation,
+  ##
+  ##   -u_xx(x) = f(x)
+  ##
+  ## in one dimension, subject to the boundary conditions,
+  ##
+  ##   u(0) = 0
+  ##   u(1) = 1
+  ##
+  ## over the interval [0,1]. It is assumed that the function `f` is at
+  ## least continuous on [0,1].
+  ##
+
+  [xs,h] = partition(integerN, a, b);
+end