I want to solve 27 odes, for that i formed equations with matrices.
First i formed A(27*27 matrix), B(27*27 matrix) and C(25*25 matrix). All three are interms of 'theta'(i used 'sym' for forming A, B, C matrices). Now iam going to use these matrices to form ode eq's and solving using ode45.
Here i gave script after forming A, B, C matrices for some confidentiality.
myfun = @(t,y)scriptname(t,y,A,B,C);
sol = ode45(myfun,tspan,y0);
function dydt = scriptname(t,y,A,B,C)
Cn = double(subs(C,y(27)));
An = double(subs(A,y(27)));
Bn = double(subs(B,y(27)));
While running the script, it is taking hours and hours(i waited 5-6 hours and stopped compiling) but not giving any result.
I dont know what is wrong with the script.
Can anyone suggest me how to get result quickly.