mode(-1); getf('Stiff.sci'); chapeau =["Exemple d''equation differentielle raide"; 'lambda : Constante de temps'; 'y0 : Valeur initiale'; 'tf : Temps d''integration'; 'h : Pas de temps' ; ' '; 'Methode :'; '0 : Explcite'; '1 : Implicite'; ]; labels=["lambda", "y0 ", "tf ", "h ", "Methode (0 ou 1)"]; dims= list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1); defaults=["50";"2"; "10"; "0.01"; "0"]; ok=1; while ok do [ok,lambda,y0, tf, h, k] = getvalue(chapeau,labels,dims,defaults); xbasc(); if ok then deff('yp=f2(t,y)','yp = -lambda*(y-cos(t))'); t0=0; n=tf/h; select k case 0 Explicit(f2,t0,y0,h,n); case 1 Implicit(f2,t0,y0,h,n); else return end defaults=string([lambda,y0, tf, h, k]); end end