From 8c8536a4a03dfdc5975b9f668305a89d1cd56e79 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 22 Mar 2013 16:34:10 -0400 Subject: [PATCH] Fix a variable name (missed in the last renaming). --- optimization/steepest_descent.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimization/steepest_descent.m b/optimization/steepest_descent.m index 1eea7bc..7a437d3 100644 --- a/optimization/steepest_descent.m +++ b/optimization/steepest_descent.m @@ -53,7 +53,7 @@ function [x, k] = steepest_descent(g, x0, step_size, tolerance, max_iterations) % loop finishes, we have implicitly met the second stopping % condition (number of iterations). - if (norm(g_k) < tolerance) + if (norm(gk) < tolerance) # This catches the k=0 case, too. x = xk; return; -- 2.43.2