[scilab-Users] problem with scilab

Serge Steer Serge.Steer at inria.fr
Thu Jul 21 14:06:16 CEST 2011


What do you mean by "it doesn't work." error message?, unexpected results?

I was not able to run it because g R DeltaP and B are undefined.


Serge Steer
INRIA

Le 21/07/2011 11:25, arnaud dujeu a écrit :
> Hi,
>
> I've got a problem to solve a non linear differential equation, which is :
>
> y1'=A*(1-sin(y2))/(pi/2-y2)-B*y1^2
> y2'=y1
>
>
> I'm using ode :
>
> function  [Xprime]=VanDerPol(t,X)
>
>   Xprime(1)  =  X(2)
>   Xprime(2)  =  g/R*(1-sin(X(1)))/(%pi/2-X(1))-deltaP/(B*(%pi/2-X(1)))
>
> endfunction
>
>   t=linspace(0,4,3000);  X0=[85*%pi/180;0];
>   [u]=ode(X0,0,t,VanDerPol);
>
> plot(t,u(1,:)*180/%pi,'r')
>   plot(t,R*u(2,:))
>
>
> but it doesn't work.
>
> Do you know why?
>
> Best regards.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110721/33b0ddf8/attachment.htm>


More information about the users mailing list