X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=divided_difference_coefficients.m;fp=divided_difference_coefficients.m;h=0000000000000000000000000000000000000000;hp=53d5799e922af57d70c74604cca5814d4d4b7b4d;hb=437324f2edf6b26c772080f8cbe3b321dda8d70f;hpb=f32a60e5aceefce5b4b7497b9d295c8175297110 diff --git a/divided_difference_coefficients.m b/divided_difference_coefficients.m deleted file mode 100644 index 53d5799..0000000 --- a/divided_difference_coefficients.m +++ /dev/null @@ -1,26 +0,0 @@ -function coefficients = divided_difference_coefficients(xs) - ## Compute divided difference coefficients of `f` at points `xs`. - ## - ## INPUTS: - ## - ## * ``xs`` - A vector containing x-coordinates. - ## - ## OUTPUTS: - ## - ## * ``coefficients`` - The vector of coefficients such that - ## dot(coefficients, f(xs)) == dd. Used to solve linear systems. - ## - - coefficients = []; - - for xj = xs - this_coeff = 1; - for xi = xs - if (xi != xj) - ## Append (xj - xi) to the vector of coefficients. - this_coeff = this_coeff * (1 / (xj - xi)); - end - end - coefficients(end+1) = this_coeff; - end -end