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?

 채택된 답변

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

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

댓글을 달려면 로그인하십시오.

추가 답변 (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