From d6e529d4fe3ede8b54d8410e4e3ecd5fc4ebbb13 Mon Sep 17 00:00:00 2001 From: yiqiedou123WEI Date: Wed, 12 Nov 2014 08:57:07 +0800 Subject: [PATCH] Update ex1a_linreg.m --- ex1/ex1a_linreg.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ex1/ex1a_linreg.m b/ex1/ex1a_linreg.m index 65ce91f..219cc93 100644 --- a/ex1/ex1a_linreg.m +++ b/ex1/ex1a_linreg.m @@ -43,7 +43,8 @@ % in linear_regression.m % tic; -options = struct('MaxIter', 200); +options = struct('MaxIter', 200);%when get running error,can try options = struct('MaxIter', 200,'useMex',0); +%thanks for Chih Cheng Liang‘s advice; theta = minFunc(@linear_regression, theta, options, train.X, train.y); fprintf('Optimization took %f seconds.\n', toc); @@ -87,4 +88,4 @@ legend('Actual Price', 'Predicted Price'); xlabel('House #'); ylabel('House price ($1000s)'); -end \ No newline at end of file +end