## variable

Purpose

Deﬁnes a matrix variable with speciﬁed structure.

Synopsis

X=variable;

X=variable(S);

Description

This program deﬁnes an abstract matrix variable X with scalar variables placed as given by matrix “S” (analog of type 3 variable declaration in the LMI Control Toolbox), where the interpretation “S” is same as in the LMI Control Toolbox except that the variable numbers are ”relative”, i.e. they always correspond to new decision variables. (default S = 1)

Example

To deﬁne matrix variables

$$X=\begin{bmatrix}x_{1}&-x_{2}&0\\x_{2}&x_{1}&0\\0&0&x_{3}\end{bmatrix}$$

$$Y=\begin{bmatrix}x_{4}&0&x_{5}\\0&0&-x_{6}\\-x_{5}&-x_{6}&0\end{bmatrix}$$

type

>> X=variable([1,-2,0;2,1,0;0,0,3]);

>> Y=variable([1,0,2;0,0,-3;-2,3,0]);