diff --git a/ex1/gradientDescent.m b/ex1/gradientDescent.m index 89734f3..f01b849 100644 --- a/ex1/gradientDescent.m +++ b/ex1/gradientDescent.m @@ -18,6 +18,8 @@ for iter = 1:num_iters % theta = theta - (alpha/m) * X' * (X*theta - y); + J = computeCost(X, y, theta) + % ============================================================ % Save the cost J in every iteration