フィルターのクリア

Quadratic Optimization using Newtons Method

1 回表示 (過去 30 日間)
rihab
rihab 2015 年 11 月 27 日
コメント済み: rihab 2015 年 11 月 27 日
I am writing Newtons method to solve an optimization problem. I have written the following code:
function estimate = newtonMethod(f,df,x0,tolerance) %f & df are functions that contain OP & gradient respectively, x0 is initial guess, tolerance is 1e-12
estimate = x0; % Initial guess
iterations = 40; % Maximum number of iterations
for j = 1:iterations;
dx = f(estimate) / df(estimate)';
estimate = estimate - dx';
% Stop criterion:
if abs(dx) < tolerance
return
end
end
end
However, the vector 'u' doesn't seem to be a good solution. My question is: Is this the correct way of solving this OP using Newtons Method? I would highly appreciate suggestions on this.
  10 件のコメント
Torsten
Torsten 2015 年 11 月 27 日
Yes.
rihab
rihab 2015 年 11 月 27 日
thank you so much Torsten :-)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by