Can vpasolve restrict the numerical solution to be a real number? If it can, how should I stipulate this condition?
조회 수: 45 (최근 30일)
이전 댓글 표시
I have eight unknown variables and eight equations. Now I use the vpasolve to find the numerical solution of the equation, hoping to get only the real solution, but the vpasolve only returns a complex solution. Can I restrict the it to output only real solutions? If I can, how should I implement it? Thank you for your reply.
댓글 수: 0
답변 (2개)
Dyuman Joshi
2022년 4월 24일
Taken from vpasolve documentation
syms x
S = vpasolve(x^6 - x^2 == 3, x)
assume(x,'real')
S = vpasolve(x^6 - x^2 == 3, [-Inf Inf])
댓글 수: 0
jessie sun
2022년 4월 25일
댓글 수: 3
Walter Roberson
2022년 4월 25일
Tips:
vpasolve ignores assumptions set on variables. You can restrict the returned results to particular ranges by specifying appropriate search ranges using the argument init_param.
참고 항목
카테고리
Help Center 및 File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!