]> gitweb.michael.orlitzky.com - octave.git/commitdiff
Fix a variable name (missed in the last renaming).
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Mar 2013 20:34:10 +0000 (16:34 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Mar 2013 20:34:10 +0000 (16:34 -0400)
optimization/steepest_descent.m

index 1eea7bc1b13a5c39511608248f6ea8ece4490029..7a437d36ad529c7f47bc1d2674bf75fb074e3beb 100644 (file)
@@ -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;