MATLAB: Solve a system of equations

system

Can anyone help me to write a code for solving the following system of equations?
w0=10; k1=3; k2=6; V1=20; V2=30;
x21=(w0+x13)/(w0+x13+k1*V1);
x22=(w0+x13);
x31=x22*x21/(x22+k2*V2);
x32=x22;
x13=x31*x32;
Suppose that x13 has an initial value (any number, let's say it is 1); Then we define what x21, x22, x31, 32 will be equal to and new value of x13*n;
If |x13*n-x|>=e (where e is a small number), then a new value of x13 should be x13*n, and we should solve that system until |x13*n-x13|<e;
Below is my idea, but I know it may be stupid but don't judge too harsh because I'm new to matlab and don't know how to do that.
w0=10; k1=3; k2=6; V1=20; V2=30; x13=1; e=0.00001; n=0.1
while abs(x13*n-x13)>=e
x21=(w0+x13)/(w0+x13+k1*V1);
x22=w0+x13;
x31=x22*x21/(x22+k2*V2);
x32=x22;
x13=x31*x32;
x13=x13*n;
end
It never stops counting

Best Answer

x22 - w0 =
x13 =
x31 * x32 =
x22 * x21 / (x22+k2*V2) * x22 =
x22 * (x22/(x22+k1*V1)) / (x22+k2*V2) * x22
This gives a quadratic equation in x22. Solve it.
Once you have x22, x13 = x22 - w0.