Solve a system of two variable inequalities with symbolic toolbox

1 回表示 (過去 30 日間)
LUCA D'AMBROSIO
LUCA D'AMBROSIO 2024 年 7 月 1 日
コメント済み: LUCA D'AMBROSIO 2024 年 7 月 2 日
Hello,
is it possible to symbolically solve a system of inequalities with variables x and y and plot the result?
lets say i have to solve x+y-25>0 and x*y+y+15>0, what function should i use?
i have tried fimplicit plus assumptions but it didn't work.
thank you

採用された回答

John D'Errico
John D'Errico 2024 年 7 月 1 日
fimplicit does not plot inequalities. Sorry. If you read the help, it never says anything about inequalities.
Simplest is to just use meshgrid. For example...
[X,Y] = meshgrid(linspace(-50,50,1000));
k = (X + Y - 25 > 0) & (X.*Y + Y + 15 > 0);
plot(X(k),Y(k),'.')
  1 件のコメント
LUCA D'AMBROSIO
LUCA D'AMBROSIO 2024 年 7 月 2 日
hi, sorry to bother you, thank you for your answer.
do you know if there is a way to extract only the boundary of the region highlighted in the figure? i figured i don't need all the points where both inequalities are satisfied but only the curve where they are equal to zero, so the boundary and i need to check how this boundary evolves with some variyng constants.
thank you for your help

サインインしてコメントする。

その他の回答 (1 件)

Torsten
Torsten 2024 年 7 月 1 日
移動済み: Torsten 2024 年 7 月 1 日
is it possible to symbolically solve a system of inequalities with variables x and y ?
What do you mean by "solve" ? The feasible set is given by the set of inequalities, and in most cases it is not possible to find an easier representation.

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by