dae2.m solves a set of differential algebraic equations (DAEs)
f(t,y,y')=0 where y'=dy/dt
with a 2nd order method starting from y0 at time t0 and finishing at time tfin where tspan=[t0 t1 ... tfin].
The method will also work well for stiff sets of ODEs.
See pendrun.m, penddae.m & pendg.m for a pendulum example.
See dae4.m and dae4o.m for higher order accurate versions. |