フィルターのクリア

How can I save the settings of fsolve in the optimization tool ?

2 ビュー (過去 30 日間)
kamal kiki
kamal kiki 2012 年 3 月 27 日
I am using the fsolve function in a simulink block which is the "MATLAB function" block.
I want to try using the fsolve function in simulink with all the different algorithms available in the optimization tool which are: Trust region dogleg OR Trust region reflective OR Levenberg-Marquardt OR Gauss-Newton.
The optimization tool allows to change the algorithm setting but it does not allow to save the setting in a way that enables the new setting to be used for an fsolve function used in simulink.
Is there any solution for this ??

採用された回答

Seth DeLand
Seth DeLand 2012 年 3 月 27 日
You can create an options structure in your MATLAB function and then pass that structure to FSOLVE. The options structure is created using OPTIMSET, and in it you will specify the Algorithm that FSOLVE should use.
For example:
options = optimset('Algorithm','levenberg-marquardt');
x = fsolve(fun,x0,options);
  1 件のコメント
kamal kiki
kamal kiki 2012 年 3 月 28 日
It is working, thank you very much Seth DeLand.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Design Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by