%% Type 1 and Type 2 Matrix Variables
% Consider an LMI system with three matrix variables X_1, X_2, and X_3 such that
% X_1 is a 3-by-3 symmetric matrix (unstructured),
% X_2 is a 2-by-4 rectangular matrix (unstructured),
% X_3 =
% \left( {\matrix{
%   \Delta  & 0 & 0  \cr
%   0 & {{\delta_1}} & 0  \cr
%   0 & 0 & {{\delta_2}{I_2}}  \cr
% } } \right),
% where Δ is an arbitrary 5-by-5 symmetric matrix, \delta_1 and \delta_2 are scalars, and I_2 denotes the identity matrix of size 2.
% Define these three variables using lmivar.

setlmis([]) 
X1 = lmivar(1,[3 1]);          % Type 1 
X2 = lmivar(2,[2 4]);         % Type 2 of dimension 2-by-4 
X3 = lmivar(1,[5 1;1 0;2 0]);  % Type 1

% The last command defines X_3 as a variable of Type 1 with one full block of size 5 and two scalar blocks of sizes 1 and 2, respectively.
% Copyright 2012 The MathWorks, Inc.