optimization with Levenberg-Marquardt algorithm

Hi everyone! I have a function f(x) (ex: f(x)=3+sin(2x)-exp(-x)) and it's experimental value Fexp (ex:0.02344). So how I can find x that minimize the difference f(x)-Fexp using Levenberg-Marquardt algorithm in Toolbox optimization? Many thanks

2 件のコメント

Matt J
Matt J 2018 年 1 月 23 日
Levenberg-Marquardt would be overkill. Since it's a 1D problem, you could just use fzero().
ghazal mohamed
ghazal mohamed 2018 年 1 月 24 日
hi Matt,thank you for your comment, the function given is just an example, the expression I want to minimize is more complicated than that. On the other hand I am not looking for zero of function, simply because f(x)-Fexp (in my case) dosen't have zero so I am looking for x that gives the smallest value of f(x)-Fexp using Levenberg-Marquardt algorithm.

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

回答 (1 件)

Alan Weiss
Alan Weiss 2018 年 1 月 24 日
編集済み: Alan Weiss 2018 年 1 月 24 日

0 投票

I am not sure that I understand you, but perhaps you are asking about Curve Fitting Via Optimization.
You are free to use the Levenberg-Marquardt algorithm in lsqcurvefit or lsqnonlin when fitting a nonlinear function to data. See the Algorithm option.
Alan Weiss
MATLAB mathematical toolbox documentation

1 件のコメント

ghazal mohamed
ghazal mohamed 2018 年 1 月 24 日
Hi Alan,thank you for your reply, I am not looking for data fitting. I have function f(x) and an experimental value Fexp, if I consider g(x)=f(x)-Fexp, x is a variable in [0 100], g(x) takes differet values depending on x, among these values (of g) there is a minimum :gmin, gmin is obtained when x=Xm so I am looking for this value Xm. (I think that I can't use a nonlinear solver because g(x) has not zero but there is a minimum value..).

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

質問済み:

2018 年 1 月 23 日

コメント済み:

2018 年 1 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by