Grid the convex set.
x = grid(Set, N)
x = Set.grid(N)
Set |
Any object derived from the ConvexSet class, e.g. Polyhedron, YSet, ... Class: ConvexSet |
N | The number of gridding point. It specifies with how many elements to scale the interval equidistantly. |
x |
An array of points sorted vertically. The number of columns specifies the dimension. Class: double |
x = sdpvar(2,1);
F = [x(1)-x(2)<=1; 0.3*x'*x <= 0.5];
Y = YSet(x,F);Grid the set with 40 gridding points (can take some time).
x = Y.grid(30);Plot each point
plot(x(:,1),x(:,2),'x','MarkerSize',7)
P(1) = Polyhedron('A',[1 -0.3; 0.5 0.7],'b',[2.3;3.1],'lb',[1;0.4]);
P(2) = Polyhedron('A',[1.6 -0.6; 0.2 0.4],'b',[2.1;2.8],'lb',[1.5;0.9]);Plot the sets
P.plot
Q = intersect(P(1),P(2));
x = Q.grid(40);Plot the grid points of the intersection
plot(x(:,1),x(:,2),'o','Color','r');axis([1 3.5 0 7]);
◀ | isbounded | fplot | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch