Why does the equation solver return only one root when using "abs"?
Mostra commenti meno recenti
I am using the Symbolic Math Toolbox.
When my equation has an absolute value the solver only returns one of the two roots.
Is this behavior expected?
Here is a reproduction example:
>> syms x
>> solve(abs(x) == 1) % ans = 1
>> solve(sqrt(x^2) == 1) % ans = [-1; 1]
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Symbolic Math Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!