3a784810bb4dab5cdae421f988810d7d5f3a45e5
[scilab.git] / scilab / modules / differential_equations / tests / nonreg_tests / bug_15523.tst
1 function ydot=f(t, y)
2     ydot=y^2-y*sin(t)+cos(t)
3 endfunction
4 %ODEOPTIONS=[2,0,0,%inf,0,2,500,12,5,0,-1,-1];
5 rtol=1e-5;
6 atol=1e-7;
7 yrkf=ode('rkf',0,0,%pi,rtol,atol,f);
8 yrk=ode('rk',0,0,%pi,rtol,atol,f);
9 assert_checktrue(size(yrkf,2)>1);
10 assert_checktrue(size(yrk,2)>1);
11 assert_checkalmostequal(yrk(2,:),sin(yrk(1,:)),1e-4,1e-4,'element')
12 assert_checkalmostequal(yrkf(2,:),sin(yrkf(1,:)),1e-4,1e-4,'element')