Plotting 2-D regions without prior knowing the numeric limits
显示 更早的评论
Hello,
I'm trying to plot a closed 2-D region defined by a set of linear inequalities (it could be a triangle, rectangle, etc., you know). Those inequalities are defined using symbolic variables and their coeficients are results from previous calculations. I tried using solve function (with 'returnconditions' to true) but I can't extract the validity intervals of the variables from the result.
I saw other answers around this topic that defined a meshgrid and checked if the conditions hold at each point of the grid. The problem is that I don't have the knowledge of the limits of the region I'm trying to plot, so I can't define a grid.
As an example, from one of the runs, i get a "1x4 sym":
[ 13/10 < K1 + 2*K2, -1/5 < 2*K2 - K1, 1/10 - (23*5^(1/2))/50 < - K1 - K2/2 - (5^(1/2)*K2)/5, - (23*5^(1/2))/50 - 1/10 < K1 + K2/2 - (5^(1/2)*K2)/5]
where K1 and K2 are the variables.
I would like to obtain the lowest and highest K1 and K2 that allow the conditions to be true, so I can make the meshgrid and plot the result. If that's not posible, obtaining a set of points satisfying the inequality system could be useful (as long as the points are distributed along the region).
Thanks for your help.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!