Main Content

dec2mat

Given values of decision variables, derive corresponding values of matrix variables

Description

valX = dec2mat(lmisys,decvars,X) computes a value of a matrix variable with identifier X corresponding to the set of decision-variable values decvars. The decision variables of an LMI system are all the free scalar variables in the system, which are the free entries of the matrix variables X1, . . ., XK. LMI solvers return a feasible or optimal value of the vector of decision variables. Use dec2mat to derive the corresponding feasible or optimal values of the matrix variables.

example

Examples

collapse all

Suppose that you have defined the LMI described in Minimize Linear Objectives Under LMI Constraints, with matrix variables X and S. In the course of defining that LMI system, you use lmivars to declare the variable X. The function returns the identifier, X.

setlmis([]) 
X = lmivar(1,[3 1]); % variable X, full symmetric

After you finish defining the rest of the variables and the LMI terms in the system, use lmisys to get the internal vector representation of the LMI system.

lmisys = getlmis;

After you specify an objective for minimization, c, you call mincx to find the vector xopt containing optimal values of the decision variables.

[copt,xopt] = mincx(LMIs,c);

Finally, use dec2mat to convert the decision variables to the full matrix value of X.

Xopt = dec2mat(LMIs,xopt,X)
Xopt = 3×3

   -6.3542   -5.8895    2.2046
   -5.8895   -6.2855    2.2201
    2.2046    2.2201   -6.0771

Input Arguments

collapse all

LMI system, specified as a vector. After defining the LMI system in MATLAB® as described in Specify LMI System at the Command Line, use getlmis to get this vector representation of the system.

Decision variables, returned as a vector. LMI solvers such as feasp and mincx return feasible or optimal values of the decision variables of the LMI system in this vector.

Variable identifier corresponding a matrix variable of lmisys, specified as an integer. Obtain this identifier as the output of lmivar when you declare the matrix variable.

Output Arguments

collapse all

Matrix variable value corresponding to the vector decvars of decision variables.

Version History

Introduced before R2006a