Remove function from all sets in the union based on the function name.
U = removeFunction(U,name)
U.removeFunction(name)
U |
Object of the Union class that holds objects derived from the ConvexSet class. Class: Union |
name |
Name of the function to remove from the union.
String must match one of the names as retrieved by listFunctions
method. For multiple names, provide pos as a cell array of strings. Class: char |
U |
Modified object of the Union class without the function handles that has been removed. Class: PolyUnion |
x = sdpvar(2,1);
F1 = [ [1, -2; 0.4, 5]*x<= [1;2]];
F2 = [ [5, -3; 1.3, -2; 0.8 -9; 1 -0.3]*x<= [1;2;1;1.5]];
Y(1) = YSet(x,F1);
Y(2) = YSet(x,F2);Define the functions
f1 = AffFunction([0.1,-3],2);
f2 = AffFunction([-2,0.5],0.4);Add these functions to the sets
Y.addFunction(f1,'f1');
Y.addFunction(f2,'f2');Create the Union object.
U = Union(Y)
Union of 2 convex sets. Functions : 2 attached "f1", "f2"Remove the function "f2" from the set
U.removeFunction('f2')
Union of 2 convex sets. Functions : 1 attached "f1"Union of sets now contains only 'f1' function
U.listFunctions
ans = 'f1'
◀ | horzcat | removeallfunctions | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch