- vpasolve() permits ranges to be specified for each value. vpasolve() will typically only find one solution
- You can add additional equations that are inequalities, but it is common for solve() to give up almost immediately when the number of equations does not match the number of variables to be solved for. Also, when solve() does respect an inequality, it does not return a description of the ranges that are valid: instead it returns a representative value. For example if it figures out that 1/2 < x < 14 then it will return 1, and if it figures out that 2 < x < 14 then it returns pi
- When you "syms" the variable or sym() it into existence, you can specify the real flag, such as syms x y real . These can help the computation a fair bit, but they can also lead to solve() missing valid answers . solve() is also permitted to ignore these kinds of assumptions
- You can assume() and assumeAlso() to add assumptions that specify restrict ranges, such as assume(2 < x & x < 14) . These have the same disadvantages as the real flag, and as well it can lead to solve() spending a lot of time working on the value of the variable at the boundary conditions when the boundary conditions might be of lower priority than some other calculations.
Is there a way to limit the "solve" function to converge only to a real solution (no imaginary or complex numbers)?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Georgios Pasias
am 22 Apr. 2019
Kommentiert: Georgios Pasias
am 23 Apr. 2019
I am trying to solve a system of algebraic equations using the "solve" function in the symbolic toolbox. Since the equations describe a physical system only a real solution can be realistic (taking the real parts of the resulting complex numbers is not a solution). Is there a way to make the "solve" function converge to real numbers only?
Thank you in advance.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 23 Apr. 2019
No, there is not.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!