Man Scilab

dasrt
Scilab Function

dasrt - DAE solver with zero crossing

Calling Sequence

[r,nn,[,hd]]=dasrt(x0,t0,t [,atol,[rtol]],res [,jac],ng, surf [,info] [,hd])

Parameters

Description

Solution of the implicit differential equation


    g(t,y,ydot)=0
    y(t0)=y0  and   ydot(t0)=ydot0
   
    

Returns the surface crossing instants and the number of the surface reached in nn .

Detailed examples can be found in SCIDIR/tests/dassldasrt.tst

Examples


//dy/dt = ((2*log(y)+8)/t -5)*y,  y(1) = 1,  1<=t<=6
//g1 = ((2*log(y)+8)/t - 5)*y 
//g2 = log(y) - 2.2491 
y0=1;t=2:6;t0=1;y0d=3;
atol=1.d-6;rtol=0;ng=2;

deff('[delta,ires]=res1(t,y,ydot)','ires=0;delta=ydot-((2*log(y)+8)/t-5)*y')
deff('[rts]=gr1(t,y)','rts=[((2*log(y)+8)/t-5)*y;log(y)-2.2491]')

[yy,nn]=dasrt([y0,y0d],t0,t,atol,rtol,res1,ng,gr1);
//(Should return nn=[2.4698972 2])
 
  

See Also

ode ,   dassl ,   impl ,   fort ,   link ,   external ,  

Back