getFunction

Purpose

Extract function handle from a convex set.

Syntax

F = getFunction(Set, FuncName)
F = Set.getFunction(FuncName)

Description

Extract Function object that is attached to a convex Set under the name FuncName.

Input Arguments

Set

Any object derived from the ConvexSet class, e.g. Polyhedron, YSet, ...

Class: ConvexSet

FuncName

Name of the function to extract.

Class: char

Output Arguments

F

Function object stored under the FuncName string.

Class: Function

Example(s)

Example 1

The polyhedron contains two functions "a" and "b".
 P = ExamplePoly.randHrep; 

 P.addFunction(AffFunction([1, -2]),'a'); 

 P.addFunction(QuadFunction([0 0.4;-0.1 0.2]),'b'); 
 Extract the function "b" from the set 
 F = P.getFunction('b') 
Quadratic Function: R^2 -> R^1

See Also

addfunction, removefunction


© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch

© 2003-2013 Michal Kvasnica: STU Bratislava, michal.kvasnica@stuba.sk