How to limit fsolve to find solution in Real numbers domain
29 ビュー (過去 30 日間)
古いコメントを表示
Suppose, If I have some set of non-linear equations. I want to solve those equations with fsolve, but I want solution only in real values not imaginary ones. Is there any way to restrict fsolve in this way?
Thanks in advance
0 件のコメント
採用された回答
Matt J
2022 年 8 月 24 日
編集済み: Matt J
2022 年 8 月 24 日
That will automatically be the case, as long as the equation functions you have provided are real-valued.
3 件のコメント
Matt J
2022 年 8 月 24 日
編集済み: Matt J
2022 年 8 月 24 日
If solve the equation it will give real root and imaginary root for different intial values.
No, that shouldn't happen.
There is no guarantee that fsolve will succeeed in finding a root, but the value it returns should always be real, assuming the cubic polynomial coefficients and the initial guess x0 are real.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!