Plotting the area which is satisfied by some inequalities
7 views (last 30 days)
Show older comments
How can I plot the area which is satisfied by the constraints:
x1 + x2 >= 1
x1 - x2 <= 0
3*x1 + x2 <= 6
x1, x2 >= 0
0 Comments
Answers (1)
John D'Errico
on 25 Aug 2015
2 Comments
John D'Errico
on 27 Aug 2015
Edited: John D'Errico
on 27 Aug 2015
What are you talking about? You pass in the constraints to plotregion as a matrix of inequality constraints and sets of lower and upper bounds. That is EXACTLY what you have. I think you need to look at plotregion. Read the help for it.
All I can imagine from your statement here is that you don't know how to write linear inequality constraints in a matrix form. So, are you really asking how one can write those equations in matrix form (i.e., linear algebra 101?)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!