function Out=ex3_robust(Init, UncVar)
persistent X F;
switch Init
    case 'sdpvars'
        Out = cell(0);
        X = sdpvar(2,2,'sy'); F = sdpvar(1,2,'f');
        Out{1} = X; Out{2} = F;
    case {1, 'init'}
        UncVar = cell(0);
        UncVar{1} = ubase('m', ...
                          'real_scalar_uniform', ...
                          'nominal', 3, ...
                          'range', 0.5);
        UncVar{2} = ubase('d', ...
                          'real_scalar_uniform', ...
                          'nominal', 2, ...
                          'range', 0.5);
        UncVar{3} = ubase('k', ...
                          'real_scalar_uniform', ...
                          'nominal', 2, ...
                          'range', 0.5);
        Out = UncVar;
    case {0, 'lmi'}
        m = UncVar{1}; d = UncVar{2}; k = UncVar{3};
        A = [0 1; -k/m, -d/m]; B = [0; 1/m];
        Q = eye(2); R = 1; S = eye(2); gamma = 5;
        Phi = A*X+B*F;
        LMI = set([]);
        LMI = LMI + set([Phi+Phi', X, F';
                         X, -inv(Q), [0; 0];
                         F, [0, 0], -inv(R)] <= 0);
        Out = LMI + set([-X, eye(2);
                         eye(2), -gamma*S] <= 0);
end