problem with scilab
arnaud dujeu
fangorn813 at hotmail.com
Thu Jul 21 11:25:34 CEST 2011
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^2y2'=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/c3124c84/attachment.htm>
More information about the users
mailing list