From 1a5bceb9de6bd3a511e7edcb6ab08f84dae63948 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 14 Sep 2012 10:28:47 -0400 Subject: [PATCH] Add the partition function. Remove shebang lines from non-executable files. Begin the solve_poisson function. --- bisect.m | 2 -- divided_difference.m | 2 -- has_root.m | 2 -- partition.m | 28 ++++++++++++++++++++++++++++ solve_poisson.m | 17 +++++++++++++++++ 5 files changed, 45 insertions(+), 6 deletions(-) mode change 100755 => 100644 bisect.m mode change 100755 => 100644 divided_difference.m mode change 100755 => 100644 has_root.m create mode 100644 partition.m create mode 100644 solve_poisson.m diff --git a/bisect.m b/bisect.m old mode 100755 new mode 100644 index 56e099e..3e8faa5 --- a/bisect.m +++ b/bisect.m @@ -1,5 +1,3 @@ -#!/usr/bin/octave --silent - function root = bisect(f, a, b, epsilon) ## Find a root of the function `f` on the closed interval [a,b]. ## diff --git a/divided_difference.m b/divided_difference.m old mode 100755 new mode 100644 index 139fa47..7b8020e --- a/divided_difference.m +++ b/divided_difference.m @@ -1,5 +1,3 @@ -#!/usr/bin/octave --silent - function dd = divided_difference(f, xs) ## Compute divided difference of `f` at points `xs`. The argument `xs` ## is assumed to be a vector containing at least one element. If it diff --git a/has_root.m b/has_root.m old mode 100755 new mode 100644 index 5c835d8..da518e9 --- a/has_root.m +++ b/has_root.m @@ -1,5 +1,3 @@ -#!/usr/bin/octave --silent - function has_root = has_root(fa, fb) ## Use the intermediate value theorem to determine whether or not some ## function has an odd number of roots on an interval. If the function diff --git a/partition.m b/partition.m new file mode 100644 index 0000000..ac616cf --- /dev/null +++ b/partition.m @@ -0,0 +1,28 @@ +function [p,delta] = partition(integerN, a, b) + ## Partition the interval [a,b] into integerN subintervals. We do not + ## requite that a