2

polytope

 2 years ago
source link: https://yalmip.github.io/command/polytope/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

polytope

Tags: Polytopes

Updated: May 19, 2021

polytope either converts a set of vertices to a set defining a polytope (in a lifted space), or converts a polytopic set to an MPT polytope

Syntax

P = polytope(v,x)
P = polytope(M)

Example

The native YALMIP use is for defing a polytope x=∑Ni=1λivi,λ≥0,∑Ni=1λi=1x=∑i=1Nλivi,λ≥0,∑i=1Nλi=1 from a set of vertices vivi.

v = randn(2,10);
x = sdpvar(2,1);
P = polytope(v,x)

The opeprator does not perform any convex hull computation to reduce the numer of vertices. Note also that the polytope is defined in the x,λx,λ-space. Hence, if you want plot it, you are most likely interested in the projection to xx

plot(P,x)

The command also serves as the interface between YALMIP objects and MPT objects, allow us to convert objects. To generate a polytopic MPT object, simply apply the operator on a purely linear object.

x = sdpvar(2,1);
P = polytope([-1 <= x <= 1]);

Previous Next


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK