Solving an inequation of first degree issue
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
i am trying to solve this inequation:
a = 3*x + 21 <= 5*x + 13
the answer matlab is giving me when i use:
solve(a)
is 5. But the answer should be x>= 4. What i am doing wrong here?
Thanks
0 件のコメント
採用された回答
John D'Errico
2021 年 4 月 1 日
編集済み: John D'Errico
2021 年 4 月 1 日
syms x
a = 3*x + 21 <= 5*x + 13
asol = solve(a,'returnconditions',true)
asol.x
asol.conditions
It looks like x >= 4 is the solution.
When you have a problem with multiple solutions, certainly an inequality like this, you need to tell MATLAB to describe the solution properly. When all I do is use solve on a, what does it do? It gives me AN answer, a valid solution to the problem.
solve(a)
Read the help docs for solve, where it explains the use of this property.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!