Why does the equation solver return only one root when using "abs"?
古いコメントを表示
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]
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!