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?

 采纳的回答

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 个评论

There is no code generation support for fsolve.
You may need to convert to fminbnd or fminsearch of the square of the function .

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Optimization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by