b = 20;
c = 100;
syms a11 a12 a21 a22 a31 a32 b11 b12 b21 b22 b31 b32 a1 a2 a3 b1 b2 b3 c1 c2 c3 d1 d2 d3
ineq1 = a11 > 0;
ineq2 = a12 > 0;
ineq3 = a31 > 0;
ineq4 = a32 > 0;
ineq5 = b11 > 0;
ineq6 = b12 > 0;
ineq7 = b22 > 0;
ineq8 = b31 > 0;
ineq9 = b32 > 0;
eq1 = a1 - a11 - a12 == 0;
eq2 = a2 - a21 - a22 == 0;
eq3 = a3 - a31 - a32 == 0;
eq4 = b1 - b11 - b12 == 0;
eq5 = b2 - b21 - b22 == 0;
eq6 = b3 - b31 - b32 == 0;
eq7 = 2*sqrt(a11*a21) - c1 == 0;
eq8 = 2*sqrt(a22*a31) - c2 == 0;
eq9 = 2*sqrt(a32*a12) - c3 == 0;
eq10 = 2*sqrt(b11*b21) - d1 == 0;
eq11 = 2*sqrt(b22*b31) - d2 == 0;
eq12 = 2*sqrt(b32*b12) - d3 == 0;
eq13 = 2*a1 - 2*b1*c - d3*c == 0;
eq14 = 2*b1*c - c1 + c*d1 == 0;
eq15 = 2*a2 - 2*b2*c - d1*c == 0;
eq16 = 2*b2*c - c2 + c*d2 == 0;
eq17 = 2*a3 - 2*b3*c - d2*c == 0;
eq18 = 2*b3*c - c3 + c*d3 == 0;
eq19 = -c1 + c*d1 - c*d2 == 0;
eq20 = -c2 + c*d2 - c*d3 == 0;
eq21 = -c3 + c*d3 - c*d1 == 0;
eqns = [eq1 eq2 eq3 eq4 eq5 eq6 eq7 eq8 eq9 eq10 eq11 eq12 eq13 eq14 eq15 eq16 eq17 eq18 eq19 eq20 eq21];
ineqs = [ineq1 ineq2 ineq3 ineq4 ineq5 ineq6 ineq7 ineq8 ineq9];
S = solve([eqns ineqs],[a11 a12 a21 a22 a31 a32 b11 b12 b21 b22 b31 b32 a1 a2 a3 b1 b2 b3 c1 c2 c3 d1 d2 d3]);
0 Comments
Sign in to comment.