hasFunction

Purpose

Returns true if the set contains given function name.

Syntax

ts = hasFunction(Set, FuncName)
ts = Set.hasFunction(FuncName)

Description

Returns true or false if the function stored under FuncName is attached to a convex Set.

Input Arguments

Set

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

Class: ConvexSet

FuncName

Name of the function to test.

Class: char

Output Arguments

ts

Logical statement if the set contains the function FuncName or not.

Class: logical

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'); 
 Does the set P contain the function "b" ? 
 P.hasFunction('b') 
ans =

     1

See Also

listfunctions, addfunction, removefunction


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

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