Maximize along a given ray within the polyhedron.
s = P.shoot(r, x0)
s = shoot(P, r, x0)
P |
Polyhedron in any format Class: Polyhedron |
dir |
Vector of size P.Dim
Class: double |
x0 |
Vector of size P.Dim
Class: double Default: Vector of all zeros |
ret |
Optimal solution Class: struct |
ret.alpha |
Maximum length of ray, [] if ![]() |
ret.exitflag |
Integer value informing about the termination status of the above optimization problem. Class: double Allowed values:
|
ret.x |
Extreme point of ray : ![]() |
P = ExamplePoly.randHrep;Choose direction and shoot:
r = randn(P.Dim,1); r = r/norm(r);
s = P.shoot(r);Plot the result
P.plot; hold on; pplot([0 0;r'*s.alpha],'linewidth',3,'color','k');
◀ | isfulldim | fplot | ▶ |
© 2010-2013 Colin Neil Jones: EPF Lausanne, colin.jones@epfl.ch