dear all
i want solve equation with using ode113
clcclear allticinitialcond=[-0.001,-0.001,-0.001,-0.001,-0.001,-0.001][T X]=ode113(@solver2link,[0 40],initialcond);toc
this is my ode file and the following file is my equation
function dy = shebhestatici1(t,y)X1=y(1,1);X2=y(2,1);X3=y(3,1);X4=y(4,1);X5=y(5,1);X6=y(6,1);M Gxdd=inv(M)*(-G);dy=xdd; end
i calculate M and G from different file
previously M and G are short equation and i could copy theme directly to my ode solver
but now after some changes it become large file and i cant copy them
so my question is how could i call them to my ode solver for example :
function dy = shebhestatici1(t,y) X1=y(1,1); X2=y(2,1);X3=y(3,1);X4=y(4,1);X5=y(5,1);X6=y(6,1); function M G xdd=inv(M)*(-G); dy=xdd; end
i know its wrong but just to clear my point
thank you all
Best Answer