* Bug #12396 fixed - Example ("problem 2") in the help page of bvode was missing...
[scilab.git] / scilab / modules / differential_equations / help / en_US / bvode.xml
index 264975f..fe43cf5 100644 (file)
@@ -2148,18 +2148,13 @@ collpnt=4;
 nsizef=4+3*M+(5+collpnt*N)*(collpnt*N+M)+(2*M-2)*2*M ;
 nsizei=3 + collpnt*N+M;;
 nmax=200;
-//    nonlin  collpnt n  ntol ndimf        ndimi        iprint iread iguess rstart nfxpnt
-ipar=[1       k       10 4    nmax*nsizef  nmax*nsizei   -1      0     0      0      0     ]
+//    nonlin  collpnt n  ntol  ndimf        ndimi       iprint iread iguess rstart nfxpnt
+ipar=[1       collpnt 10  4   nmax*nsizef  nmax*nsizei   -1      0     0      0      0     ]
 
 ltol=1:4;//set tolerance control on zu(1), zu(2), zu(3) and zu(4)
 tol=[1.e-5,1.e-5,1.e-5,1.e-5];//set tolreance values for these four controls
 xpoints=x_low:0.01:x_up;
 
-zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
-        fsub2,dfsub2,gsub2,dgsub2,guess2);
-scf(1);clf();plot(xpoints,zu([1 3],:)) // the evolution of the solution phi and psi
-
-//using an initial guess
 // - The function which computes the initial guess, unused here
 function [zu,dmval]=guess2(x,gam),
    cons=gam*x*(1-x^2/2)
@@ -2173,7 +2168,13 @@ function [zu,dmval]=guess2(x,gam),
      zu=[2*x;2;-2*x+cons;-2*dcons]
      dmval(2)=d2cons
    end
-endfunction 
+endfunction
+
+zu=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
+        fsub2,dfsub2,gsub2,dgsub2,guess2);
+scf(1);clf();plot(xpoints,zu([1 3],:)) // the evolution of the solution phi and psi
+
+//using an initial guess
 ipar(9)=1;//iguess
 
 zu2=bvode(xpoints,N,m,x_low,x_up,zeta,ipar,ltol,tol,fixpnt,...
@@ -2225,9 +2226,9 @@ la0=input('n-th eigenvalue: n= ?');la0=(%pi/2+la0*%pi)^2;
 
 z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0));
 // The same call without any display
-z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=1));
+z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=1);
 // The same with a lot of display
-z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=-1));
+z=bvodeS(x,m,n,a,b,fsub,gsub,zeta,ystart=list(ystart,la0),iprint=-1);
 
 clf()
 plot(x,[z(1,:)' z(2,:)'])