MATLAB: How to solve for or separate variable from others in an equation

separate variablesolve for variable

Hello everyone,
Please I am seeking help in solving the following equation:
4*X =(Z*C/G^2)*(1-x)
I want MATLAB to solve the equation for x; in other words x needed to be alone on the L.H.S.
I have tried
syms X Z C G
solve(((Z*C/G^2)*(1-x))-(4*x)==0,X)
but I got an error
Thanks in advance
Aziz

Best Answer

This works:
syms C G X Z
Eqn = 4*X == (Z*C/G^2)*(1-X);
X_sol = solve(Eqn, X)
X_sol =
(C*Z)/(4*G^2 + C*Z)