How do I add "internal" upper and lower bounds to the function lsqcurvefit?

7 ビュー (過去 30 日間)
Warren Boschen
Warren Boschen 2022 年 9 月 15 日
編集済み: Torsten 2022 年 9 月 16 日
Hello everyone,
I'm having trouble understanding the documentation for the function lsqcurvefit, and in particular the sections discussing the upper and lower bounds of the minimization. I have the sample data E' and an equation for the simulated data E, and the minimization would look as such:
Notably, . How would I use lb and ub to specify that this condition must hold, in addition to setting lb = 0 and ub = for the whole minimization? Would this function even work in my case because I have more than one parameter which needs to be fit?
Thank you,
Warren

採用された回答

Torsten
Torsten 2022 年 9 月 15 日
The condition lambda_1 <= lambda_2 has to be set in A,b of the mimimizer "fmincon".
"lsqcurvefit" is not suited in this case.
  2 件のコメント
Warren Boschen
Warren Boschen 2022 年 9 月 16 日
It seems as though fmincon requires that only one parameter be minimized, whereas I would like to have both lambda_1 and lambda_2 be minimized simultaneously under the condition that lambda_1 <= lambda_2. How would I account for that using fmincon?
Torsten
Torsten 2022 年 9 月 16 日
編集済み: Torsten 2022 年 9 月 16 日
No, "fmincon" can handle as many parameters as you like.
But in contrast to "lsqcurvefit", you have to supply sum(res.^2) (a scalar) instead of res (a vector) in your objective function.

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

その他の回答 (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