From 3b53099a4e07530a498d6aa959defa6f01244154 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 20 Mar 2013 01:15:50 -0400 Subject: [PATCH] Fix function name in vanilla_cgm.m. Remove unused vector in vanilla_cgm(). --- optimization/vanilla_cgm.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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. -- 2.43.2