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 1; 0.5; 0; 0.5; 1];
rho = [...
   6.1708720e-02;
   2.1745750e-01;
   1.9548592e-01;
   1.8981930e-01;
   2.5047206e-01;
   2.3089783e-01;
   1.9211276e-01;
   3.0548290e-01;
   1.6756496e-01;
   8.3758342e-02;
   2.3556814e-01;
   2.0186508e-01;
   3.0886895e-01;
   2.3676268e-01;
   2.9952651e-01;
   7.7600134e-02;
   1.8720573e-01;
   2.9178018e-01;
   2.1265183e-01;
   2.8227855e-01;
   3.2168475e-01;
   1.7083959e-01;
   2.8716066e-01;
   2.2155032e-01;
   2.2178142e-01;
   2.0871649e-01;
   2.7485371e-01;
   3.1370018e-01;
   7.2268169e-02;
   2.5900029e-01;
   9.9519961e-02;
   1.2679561e-01;
   1.6535088e-01;
   1.4571062e-01;
   1.8549890e-01;
   3.0855908e-01;
   2.3725722e-01;
   3.2023211e-01;
   7.3278679e-02;
   2.5926883e-01;
   8.1867650e-02;
   3.5323400e-01;
   2.1094185e-01;
   2.3983085e-01;
   2.3513636e-01;
   3.2126406e-01;
   3.1041131e-01;
   1.4222253e-01;
   3.1823020e-01;
   5.7424588e-02;
   1.9654637e-01;
   1.2035135e-01;
   7.2937515e-02;
   2.0966150e-01;
   1.9791142e-01;
   1.7687301e-01;
   1.6392653e-01;
   2.1652166e-01;
   3.2488314e-01;
   2.3646888e-01;
   1.5947475e-01;
   7.3689374e-02;
   1.1945346e-01;
   1.4949150e-01;
   1.6017165e-01;
   5.8839359e-02;
   2.0768504e-01;
   2.6456069e-01;
   3.3217076e-01;
   2.2229979e-01;
   3.0487238e-01;
   2.9792391e-01;
   3.3370907e-01;
   1.7378672e-01;
   2.9308822e-01;
   2.4163094e-01;
   7.7422119e-02;
   2.7923842e-01;
   3.0777996e-01;
   1.8431750e-01;
   1.7405171e-01;
   3.1217847e-01;
   1.0926905e-01;
   3.2879992e-01;
   2.2092614e-01;
   3.2517816e-01;
   2.0629803e-01;
   1.6820792e-01;
   2.2308525e-01;
   4.9737436e-02;
   2.1498747e-01;
   3.3956316e-01;
   3.0503403e-01;
   3.4552317e-01;
   3.2900879e-01;
   2.1482066e-01;
   2.8347082e-01;
   4.3775825e-02;
   2.6449906e-01;
   2.7928486e-01;
   1.1678154e-01;
   2.2921877e-01;
   3.2459774e-01;
   2.7218613e-01;
   2.1582661e-01;
   3.1497233e-01;
   9.7648053e-02;
   1.2556153e-01;
   1.7908574e-01;
   3.0358101e-01;
   1.8419402e-01;
   1.5459774e-01;
   2.8578042e-01;
   3.1911160e-01;
   2.5363740e-01;
   7.9654803e-02;
   2.3234214e-01;
   2.2779211e-01;
   1.9622574e-01;
   2.5107354e-01;
   3.4965551e-01;
   2.2669027e-01;
   3.1939494e-01;
   3.0622477e-01;
   3.1103985e-01;
   3.2372617e-01;
   3.2268757e-01;
   1.5021233e-01;
   2.3118303e-01;
   1.6803654e-01;
   1.4850119e-01;
   3.4554135e-01;
   1.3363151e-01;
   8.7718138e-02;
   3.0852397e-01;
   1.5743223e-01;
   3.0317048e-01;
   2.6680572e-01;
   3.2217318e-01;
   1.5333305e-01;
   2.5920675e-01;
   2.3420365e-01;
   1.7331606e-01;
   1.7508756e-01;
   2.0402584e-01;
   3.0869902e-01;
   3.2116260e-01;
   3.5153136e-01;
   2.5224290e-01;
   3.2470485e-01;
   1.2049063e-01;
   4.4731128e-02;
   3.1183451e-01;
   1.2903071e-01;
   2.8867600e-01;
   2.6506317e-01;
   1.1304147e-01;
   3.2706393e-01;
   2.9138866e-01;
   1.5375509e-01;
   2.2708053e-01;
   1.9455942e-01;
   1.7356696e-01;
   1.3710842e-01;
   1.7663859e-01;
   2.8620277e-01;
   4.1358658e-02;
   2.1178679e-01;
   1.3516961e-01;
   1.4028063e-01;
   1.8164228e-01;
   2.6846530e-01;
   6.4665685e-02;
   1.4551008e-01;
   1.8783561e-01;
   2.6632549e-01;
   2.1170074e-01;
   2.1890591e-01;
   2.5722591e-01;
   5.3728652e-02;
   2.8395475e-01;
   1.5079064e-01;
   2.0195464e-01;
   6.5888336e-03;
   2.9499938e-01;
   2.9143209e-01;
   2.1185091e-01;
   3.1956628e-01;
   8.3864245e-02;
   3.2128002e-01;
   1.9918950e-01;
   3.4685084e-01;
   3.1236073e-01;
   3.2241914e-01;
   3.3846106e-01;
   2.2796421e-01;
   3.4020204e-01;
   1.1221275e-01;
   4.3424054e-02;
   3.1315854e-01;
   1.4569933e-01;
   2.6922548e-01;
   2.6195392e-01;
   1.8862313e-02;
   3.3209169e-01;
   2.0559036e-01;
   1.1245751e-01;
   7.2691727e-02;
   2.6776163e-01;
   3.3781576e-01;
   1.5293810e-01;
   2.3084389e-01;
   2.6781152e-01;
   2.8224293e-01;
   2.9648126e-01;
   9.2601555e-02;
   2.5295783e-01;
   2.6560566e-01;
   1.9207321e-01;
   2.3423331e-01;
   1.6832928e-01;
   3.2501482e-01;
   2.5037328e-01;
   2.8123418e-01;
   3.0566209e-01;
   3.2165771e-01;
   2.1253484e-01;
   1.0730787e-01;
   1.4615754e-01;
   1.9044186e-01;
   3.2712468e-01;
   3.4670100e-01;
   1.9506876e-01;
   1.6906291e-01;
   3.4354536e-01;
   2.9146388e-01;
   3.0784623e-01;
   3.5410557e-01;
   3.2599116e-01;
   2.1049355e-01;
   3.4354389e-01;
   3.2808834e-01;
   3.2475441e-01;
   3.3968496e-01;
   3.4516618e-01;
   2.8310351e-01;
   3.2474356e-01;
   2.9492850e-01;
   3.3488266e-01;
   6.0347532e-02;
   3.2106535e-01;
   2.7941360e-01;
   2.5279729e-01;
   3.2920585e-01;
   1.5684388e-01;
   2.3158174e-01;
   2.1065076e-01;
   3.2970583e-01;
   2.4823247e-01;
   2.4616672e-02;
   2.0854103e-01;
   5.2390022e-02;
   9.7912577e-02;
   2.0997198e-01;
   2.4194744e-01;
   3.2904930e-01;
   1.9017228e-01;
   2.1323516e-01;
   2.9995156e-01;
   2.4245459e-01;
   2.8536421e-01;
   1.8021250e-01;
   2.7317058e-01;
   2.2284657e-01;
   1.3697574e-01;
   2.1521732e-01;
   2.9269129e-01;
   1.9519046e-01;
   3.0349878e-01;
   8.5443720e-02;
   1.3422372e-01;
   1.3941602e-01;
   3.5164393e-01;
   1.8177411e-01;
   1.8697155e-01;
   2.1754976e-01;
   1.0943155e-01;
   3.4454424e-01;
   1.6643485e-01;
   2.9284487e-01;
   2.1182474e-01;
   2.0128757e-01;
   3.0575773e-01;
   1.4987267e-01;
   3.7712882e-01;
   1.4214747e-01;
   3.5301784e-01;
   8.0867966e-02;
   2.8322509e-01;
   2.6104116e-01;
   3.5612483e-01;
   1.6608157e-01;
   3.4174540e-01;
   1.9292274e-01;
   2.8953368e-01;
   2.6069828e-01;
   2.4739233e-01;
   2.7786247e-01;
   8.6742154e-02;
   2.0913795e-01;
   3.1488167e-01;
   3.9299861e-01;
   1.4447715e-01;
   1.4231534e-01;
   3.7065460e-01;
   2.7674599e-01;
   3.9147175e-01;
   3.2811662e-01;
   1.1358096e-01;
   3.8837490e-01;
   2.8614756e-01;
   2.1391607e-01;
   1.9705965e-01;
   3.1979377e-01;
   3.4472023e-01;
   1.6573009e-01;
   1.3688053e-01;
   3.7624530e-01;
   1.2551030e-01;
   2.2194032e-01;
   3.4290966e-01;
   2.1920422e-01;
   2.8166905e-01;
   2.8379760e-01;
   3.1754363e-01;
   4.9612652e-02;
   2.7142041e-01;
   2.3050625e-01;
   6.1182120e-02;
   2.1352585e-01;
   2.9618720e-01;
   2.0769550e-01;
   3.5649559e-01;
   3.1569977e-01;
   3.8646104e-01;
   3.6755367e-01;
   3.3639025e-01;
   3.2941406e-01;
   2.0485164e-01;
   2.9500727e-01;
   3.2784055e-01;
   3.8457390e-01;
   2.9050992e-01;
   2.0480850e-01;
   3.8295299e-01;
   1.6123798e-01;
   3.2336873e-01;
   2.4338456e-01;
   3.1785444e-01;
   3.0252856e-01;
   1.7512292e-01;
   3.3694627e-01;
   3.1816461e-01;
   2.6965490e-01;
   2.2233411e-01;
   3.5503534e-01;
   9.1943226e-02;
   3.5059876e-01;
   1.7004378e-01;
   1.9286704e-01;
   3.0773501e-01;
   1.5127729e-01;
   3.8695549e-01;
   3.7457270e-01;
   3.3694187e-01;
   3.2348612e-01;
   3.8323106e-01;
   1.2226889e-01;
   3.9349593e-01;
   1.6500644e-01;
   3.6894896e-01;
   1.7775637e-01;
   3.2935125e-01;
   2.9514073e-01;
   3.8613125e-01;
   3.3255244e-01;
   2.3127189e-01;
   3.5190933e-01;
   4.0249974e-01 ];

[N,M] = size(S2);
B = [];  c = [];  d = [];
for i = 1:N 
    for j = 1:i-1
        if S1(i,j)
            b = zeros(1,N);   b(i) = 1;  b(j) = -1;  B = [B; b];
            c = [c; 0];
            d = [d; 0];
        end;
    end;
end;
for i=1:N
    for j=1:M
        if S2(i,j)
            b = zeros(1,N);   b(i) = 1;   B = [B;b];
            c = [c; -uf(j)];
            d = [d; -vf(j)];
        end;
    end;
end;
