variable

Purpose

Defines a matrix variable with specified structure.

Synopsis

X=variable;

X=variable(S);

Description

This program defines 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 define 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]);

See also

diagonal, rectangular, skewsymmetric