Remove function associated to a convex set based on the function name.
Set = removeFunction(Set,name)
Set.removeFunction(name)
Set |
Any object derived from the ConvexSet class, e.g. Polyhedron, YSet, ... Class: ConvexSet |
name |
Name of the function to remove from the array. String must match one of the stored function names.
For multiple names, specify name as a cell array of strings. Class: double or char |
Set |
Modified object of ConvexSet class without the function that has been removed. Class: ConvexSet |
P = Polyhedron('lb',-4,'ub',5);Define the functions
f1 = AffFunction(-1,1); f2=AffFunction(1,2);Add these functions to the polyhedron
P.addFunction(f1, 'f1');
P.addFunction(f2, 'f2');Remove the function "f1" from the set
P.removeFunction('f1')
Polyhedron in R^1 with representations: H-rep (redundant) : Inequalities 2 | Equalities 0 V-rep : Unknown (call computeVRep() to compute) Functions : 1 attached "f2"Polyhedron no contains only 'f2' function
P.Func
ans = [1x1 AffFunction]
◀ | horzcat | removeallfunctions | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch