Extract vector of decision variables from matrix variable values
decvec = mat2dec(lmisys,X1,X2,X3,...)
Given an LMI system lmisys with matrix variables X1, . . ., XK and given values X1,...,Xk of X1, . . ., XK, mat2dec returns the corresponding value decvec of the vector of decision variables. Recall that the decision variables are the independent entries of the matrices X1, . . ., XK and constitute the free scalar variables in the LMI problem.
An error occurs if the dimensions and structure of X1,...,Xk are inconsistent with the description of X1, . . ., XK in lmisys.
Consider an LMI system with two matrix variables X and Y such that
X is a symmetric block diagonal with one 2-by-2 full block and one 2-by-2 scalar block.
Y is a 2-by-3 rectangular matrix.
Particular instances of X and Y are
and the corresponding vector of decision variables is given by
decv = mat2dec(lmisys,X0,Y0) decv' ans = 1 3 -1 5 1 2 3 4 5 6
Note that decv is of length 10 since Y has 6 free entries while X has 4 independent entries due to its structure. Use decinfo to obtain more information about the decision variable distribution in X and Y.