How to limit fsolve to find solution in Real numbers domain

30 次查看(过去 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

采纳的回答

Matt J
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
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 CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by