function Info = Example2_TOP11b

amin = 0;
amax = 25;
bmin = 0;
bmax = 8; 
ares = 5;
bres = 0.1/4;
dh1 = 1; %bound dh1
dh2 = 1; %bound dh2
h = [dh1; dh2];

mus = [10 1 1e-1 1e-2 0.04 1e-3 1e-6 1e-9];


for g = 1:3:4 %lyapunov matrix degree
    for s = 1:3:4 %controller gain degree
        deg = [g s];
        b_acc = [];
        degL = g; %[g g]; %(g) degL=0 => Quadratic stability (Lyapunov quad.)
        degG = s; %[s s]; %(s) degG=0 => robust controller
        display('=======================================')
        fprintf('(g,s) = (%1.0f,%1.0f)\n',g,s);
        %disp('synth_fuzzy_MPA09_T6_c_yal2');
        display('---------------------------------------')
        
        for a = amin:ares:amax
            b = bmin;
            res = 4;
            while res > bres
                res = res/2;
                feas =1;
                while feas == 1 && b < bmax;
                    b = b + res;

                    A1 = [3.6 -1.6; 6.2 -4.3];
                    A2 = [-a -1.6; 6.2 -4.3];
                    B1 = [-0.45; -3];
                    B2 = [-b; -3];                    
                    Ai = [A1 A2];
                    Bi = [B1 B2];
                    
                    % Parameters
                    param.m = 1; %length of multi-simplex
                    param.r = 2; %length of each simplex
                    param.phi = [1 1; 1 1]; %[phi_1 ... phi_r1; ... ; phi_1 ... phi_rm]
                    param.scale = [10 1 1e-1 1e-2 0.04 1e-3 1e-6 1e-9]; % set of scalars beta for line search
                    
                    param.deg_Lyap = degL; %partial degrees [g1 g2 ... gm] associated to the polynomially
                    %parameter-dependent Lyapunov matrix
                    param.deg_gain = degG; %partial degrees [s1 s2 ... sm] associated to the
                    %state feedback controller ([0 ... 0] = robust controller);
                    
                    Info = synth_tfs_TOP11b_T2_yal(Ai,Bi,param);
                    
                    feas = Info.feas;
                    fprintf('.');
                end
                b = b-res;
            end
            bf = b-res;
            fprintf('\n(%1.0f,%1.2f), {g=(%d,%d), %d lmis, %d vars, %1.2f sec}\n',a,bf,deg,Info.L,Info.K,Info.cpusec);
            b_acc = [b_acc bf];
        end
    end
end