From: Michael Orlitzky Date: Fri, 22 Mar 2013 20:34:10 +0000 (-0400) Subject: Fix a variable name (missed in the last renaming). X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=8c8536a4a03dfdc5975b9f668305a89d1cd56e79;p=octave.git Fix a variable name (missed in the last renaming). --- 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;