Question regarding optimization function fsolve

Is there any function to solve non-linear trigonometric equations in MAT LAB other than fsolve?
What is the '@' anonymous in the '@function ' ? is there anything that we can replace the @ with ---?
implementation of fsolve function in MAT LAB simulinc is getting problem, how can we generate C code for this optimization function?

1 件のコメント

gopi raju rachakonda
gopi raju rachakonda 2019 年 1 月 28 日
it is the function of two variables

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

 採用された回答

Walter Roberson
Walter Roberson 2019 年 1 月 28 日

0 投票

fzero if it is a function of one variable .
The trick to using anonymous functions in aa MATLAB Function Block is to create a second function that does the work.
result = MySolve(uu)
...
function result = MySolve(uu)
ff = @(xx) appropriate code
xx = fsolve(ff, x0)
...
The @ cannot be in a direct function block but it can be aa layer down .

2 件のコメント

Walter Roberson
Walter Roberson 2019 年 1 月 28 日
There is no code generation support for fsolve.
You may need to convert to fminbnd or fminsearch of the square of the function .
gopi raju rachakonda
gopi raju rachakonda 2019 年 1 月 28 日
thank you

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeOptimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by