MATLAB: Symbolic solutions to sysems of ODEs

MATLABodesymolic

I cannot get this to work, so please help:
syms r1 r2 r3 r4 L1 C1 ia(t) va(t) ic(t) vc(t) ic1 ic2
eqn3=va==L1*diff(ia,t);
eqn4=ic==C1*diff(vc,t);
eqn1=r1*ia+va+r2*(ia-ic)==0;
eqn2=r2*(ic-ia)+vc+r3*ic==0;
eqn=[eqn1;eqn2;eqn3;eqn4];
%calculate the ic's
ic1=4/(r4+(r1*r2/(r1+r2)))*r1/(r1+r2);
ic2=ic1*r2;
cond=[ic1;ic2];
dsolve(eqn,cond)

Best Answer

hope that works: