I want to solve set of 1st order odes, for that i used ode45 function.
But with ode45, it is taking hours and hours of time to compile(i runned for 10 hours but still running no result yet).
So i want to use runge kutta method in place of this ode45, but i dont know how to implement that.
I gave my script below and i skipped some initial lines which contains A, B, C matrices(which are interms of theta) formation 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)));
How to implement rk method in this???