Bonjour,
Soit le code suivant
J'obtiens l'erreur ci-dessousCode:deff('dy = satellite(t,y)',... 'dy(1)= y(3);... dy(2)=y(4);... C=-1/(y(1)^2+y(2)^2)^(3/2);... dy(3)=C*y(1);... dy(4)=C*y(2)'); // conditions initiales (m et m/s) PositionInitiale1=[0 ;1]; VitesseInitiale1=[0;0.5]; init1=[PositionInitiale1;VitesseInitiale1]; // temps de simulation = une journée T=24*3600*365;temps=0:10000:T; // Resolution de l'equation differentielle sol1=ode(init1,0,temps,satellite); // Plot de la solution plot(0,0,'X') xstring(0,0,'Terre') plot(sol1(1,: ),sol1(2,: ),'g')
avec une fenêtre sans courbe ... J'ai pensé à modifier le pas, en vain ... J'ai trouvé ça sur le net http://home.iitj.ac.in/~sk/scilab/Scilab_Control.pdf (paragraphe 8 ). Il faut apparemment changer le nombre maximum d'étapes (500 par défaut), ou rajouter une option dans "ode" (rkf ou stiff).Code:sol1=ode(init1,0,temps,satellite); lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.1028221443872D-15 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.1028221443872D-15 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.1028221443872D-15 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.8288557288226D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.8288557288226D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.6858999333087D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.6858999333087D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.6858999333087D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.5529082211679D-16 lsoda-- caution... t (=r1) and h (=r2) are such that t + h = t at next step (h = pas). integration continues where r1 is : 0.1954946346215D+01 and r2 : 0.5529082211679D-16 lsoda-- previous message precedent given i1 times will no more be repeated where i1 is : 10 lsoda-- at t (=r1), mxstep (=i1) steps needed before reaching tout where i1 is : 500 where r1 is : 0.1954946346215D+01 Attention: Le résultat est peut être inexact.
J'ai essayé les 3, en vain ...
Merci d'avance.
-----