MATLAB: If i have two equations with three variables, how to get the ratio (transfer function) using matlab

The equations are attached in the picture. I want the code that finds E2/E1

Best Answer

Here you go:
syms E1 E2 E3 s
Eqn1 = E3 - E1 + E3*s/2 + (E3 - E2)/(4*s);
Eqn2 = (E2 - E3)/(4*s) + E2*s/3 + E2;
E31_sol = solve(Eqn1, E3);
E32_sol = solve(Eqn2, E3);
E2_sol = solve(E31_sol == E32_sol, E2);
E2_by_E1 = E2_sol/E1
E2_by_E1 =
6/(4*s^3 + 20*s^2 + 29*s + 12)
Related Question