horzcat

Purpose

Horizontal concatenation for convex set objecs.

Syntax

S = [S1, S2]
S = horzcat(S1,S2)

Description

Overloaded method for horizontal concatenation of convex sets. It is not possible to concatenate objects of different type to the same array (e.g. Polyhedron and YSet). Similarly, it is not possible to concatenate into matrices, only vectors are allowed.

Input Arguments

S1

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

Class: ConvexSet

S2

Any object derived from the ConvexSet class that is of the same type as S1.

Class: ConvexSet

Output Arguments

S

The array of the convex sets.

Class: ConvexSet

Example(s)

Example 1

We have two sets described in Yalmip.
 x = sdpvar(1); 

 S1 = YSet(x,[x<=1]); 

 S2 = YSet(x,[x>=2]); 
 Horizontal concanation gives an array with 2 elements 
 S = [S1, S2] 
Array of 2 YSets.

Example 2

It is not possible to create array with the mixed sets. Define Yalmip set first
 x = sdpvar(2,1); 

 S = YSet(x, [0.5*x(1)-4*x(2)<=1]); 
 Define Polyhedron object
 P = Polyhedron([1 0; -1 -1]); 
 Concatenation of YSet and Polyhedron is not allowed 
 [S, P] 
Only the same sets can be concatenated.

See Also

vertcat


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