Symbolic solution of 6 equations and 6 unknowns with sympy

I am trying to use sympy.solve () to solve a system of questions with 6 equations and 6 unknowns:

import sympy as sp

S11A,S21A,S22A = sp.symbols('S11A S21A S22A')
S11B,S21B,S22B = sp.symbols('S11B S21B S22B')
s11,s21,s31,s22,s31,s32,s33,G3 = sp.symbols('s11 s21 s31 s22 s31 s32 s33 G3')

eq1 = S11A - s11 + s31*G3*s31/(1-s33*G3)
eq2 = S22A - s22 + s32*G3*s32/(1-s22*G3)
eq3 = S21A - s21 + s31*G3*s32/(1-s33*G3)
eq5 = S11B - s11 + s21*G3*s21/(1-s22*G3)
eq6 = S22B - s33 + s32*G3*s32/(1-s33*G3)
eq7 = S21B - s31 + s21*G3*s32/(1-s22*G3)

soln = sp.solve([eq1,eq2,eq3,eq5,eq6,eq7],(s11,s31,s33,s22,s32,s21))

However, after a few hours, the computer is still working on a solution. Perhaps this is too complicated?

+4
source share
1 answer

, , , . , eq1, eq2 eq5 s11, s21 s31 - - . , , , . , , , , , , .

6 6 .

0

Source: https://habr.com/ru/post/1649080/


All Articles