Hello,

From a simulation software, I obtain in a matlab file my differential equations in the following way :

C_p_e = C_state/C_c;

C_p_f = I_state/I_i;

R_p_e = R_r*C_p_f;

I_p_e = (Se_p_e-R_p_e)-C_p_e;

For theses expressions, I would like to do two operations :

1) Transform it into equations

2) Conduct substitutions so as to change the names of the variables with nicer names.

For this objectives, I could do with the following code:

restart;

eq1:=C_p_e = C_state/C_c;

eq2:=C_p_f = I_state/I_i;

eq3:=R_p_e = R_r*C_p_f;

eq4:=I_p_e = (Se_p_e-R_p_e)-C_p_e

allsubs:= proc(XX )

subs(C_p_e=fs(t),C_p_f=v(t),R_p_e=fd(t),I_p_e=fm(t),C_c=1/k,I_i=m,R_r=c,Se_p_e=fe(t),I_state=int(fm(t),t),C_state=int(v(t),t),XX)

end proc:

eq1_a:=allsubs(eq1);

eq2_a:=allsubs(eq2);

eq3_a:=allsubs(eq3);

eq4_a:=allsubs(eq4);

Now, I would like to automatisation the creation of the equations eq1, eq2, eq3, eq4. For the moment, to create these equations, I have done copy/ paste from matlab.

But, I would like to create these equations eq1, eq2, eq3, eq4 with a automative process from my matlab equations. The reason comes from the fact that I would like to make the same work on bigger system which are composed with numerous equations.

**How can I create equations labeled eq1, ...eqn from a list of expressions from matlab ?**

Thank you for your help