I have a set of constraints with the variables x_1 and x_2.
relations = [-1 <= x_1, x_1 <= 1, -1/2 <= x_2, x_2 <= 3/2]
and plotting the polygon works just fine in Maple when I use
Plot(PolyhedralSet(relations))
but now I want to plot x_3 and x_4 depending on x_1 and x_2 like this relations_2 = [x_3 = x_1 + x_2, x_4 = x_1 - x_2]
.
The Problem is, that Maple can't plot this, because this isn't 3 dimensional anymore. I haven't found anything on how I can disregard plotting x_1 and x_2.
Asked
Active
Viewed 33 times
0

ufg
- 41
- 3
1 Answers
2
with(PolyhedralSets):
R := [-1<=x1, x1<=1, -1/2<=x2, x2<=3/2]:
C := [x3=x1+x2, x4=x1-x2]:
Rnew := eval(R,solve(C,[x1,x2])[1]);
[-1 <= 1/2*x3+1/2*x4, 1/2*x3+1/2*x4 <= 1,
-1/2 <= -1/2*x4+1/2*x3, -1/2*x4+1/2*x3 <= 3/2]
Plot(PolyhedralSet(R));
Plot(PolyhedralSet(Rnew));

acer
- 6,671
- 15
- 15