필터 지우기
필터 지우기

Solve a system of two variable inequalities with symbolic toolbox

조회 수: 3 (최근 30일)
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 CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by