How to limit fsolve to find solution in Real numbers domain
조회 수: 20 (최근 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!