From: Michael Orlitzky Date: Wed, 20 Mar 2013 05:15:50 +0000 (-0400) Subject: Fix function name in vanilla_cgm.m. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=commitdiff_plain;h=3b53099a4e07530a498d6aa959defa6f01244154 Fix function name in vanilla_cgm.m. Remove unused vector in vanilla_cgm(). --- diff --git a/optimization/vanilla_cgm.m b/optimization/vanilla_cgm.m index 2c94487..3a72b14 100644 --- a/optimization/vanilla_cgm.m +++ b/optimization/vanilla_cgm.m @@ -1,4 +1,4 @@ -function [x, k] = conjugate_gradient_method(A, b, x0, tolerance, max_iterations) +function [x, k] = vanilla_cgm(A, b, x0, tolerance, max_iterations) % % Solve, % @@ -36,8 +36,6 @@ function [x, k] = conjugate_gradient_method(A, b, x0, tolerance, max_iterations) % % All vectors are assumed to be *column* vectors. % - zero_vector = zeros(length(x0), 1); - k = 0; x = x0; % Eschew the 'k' suffix on 'x' for simplicity. rk = A*x - b; % The first residual must be computed the hard way.