I find @LutzL's comment very helpful. With ode15s you can configure the DAE solver. Example: "Solve Robertson's problem as semi-branched differential algebraic equations (DAEs)" at https://www.mathworks.com/help/matlab/ref/ode15s.html
In my case, I would set the matrix:
M=[zeros(1,3);0,1,0;0,0,1]; options = odeset('Mass',M,'RelTol',1e-5,'AbsTol',1e-6,'MaxStep',0.01); y0=[v0,n0,h0]; [T,Y]=ode15s(@slow,[0 50],y0,options);
And slow is a function defined as:
function dy = slow(t,y) v=y(1); n=y(2); h=y(3); dy=zeros(3,1); dy(1)=F(v,n,h); dy(2)=f(n,v); dy(3)=g(h,v); end
source share