Open liushang0322 opened 2 years ago
this maybe right:
using Symbolics, LinearAlgebra @syms G1 G2 G3 G4 H1 H2 H3 Q = zeros(Num,5,5) Q[1,5] = -H3 Q[2,1] = G1 Q[2,4] = -H2 Q[3,2] = G2 Q[3,5] = H1 Q[4,3] = G3 Q[5,4] = G4 P=[1 0 0 0 0]' G=(I(size(Q,1))-Q)\P g = G[end] g = expand(g) #= g = simplify_fractions(g) =# op = operation(g) g1,g2 = arguments(g) g2 = PolyForm(g2) g2 = simplify_fractions(g2) g = g1//g2
but this is wrong?
@syms G1 G2 G3 G4 H1 H2 H3 Q = zeros(Num,5,5) Q[1,5] = -H3 Q[2,1] = G1 Q[2,4] = -H2 Q[3,2] = G2 Q[3,5] = H1 Q[4,3] = G3 Q[5,4] = G4 P=[1 0 0 0 0]' G=(I(size(Q,1))-Q)\P g = G[end] g = expand(g) g = simplify_fractions(g)
this maybe right:
but this is wrong?