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?

 Accepted Answer

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 Comments

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

Sign in to comment.

More Answers (0)

Categories

Find more on Optimization in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!