Why does the equation solver return only one root when using "abs"?
Afficher commentaires plus anciens
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]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!