Scilab
Posts  1 - 1  of  1
vesy
Hello!
I'm new to this forum. I would like to ask you for your help on my following problem I have equation in matlab *.m file, that i would like to run in scilab.
MATLAB
function elliptical=equ_mot(t,Y)
elliptical(1,1)=Y(2);
elliptical(2,1)=(-a*cos(Y(1))*acc+0.5*Y(2)^2*(a^2-b^2)*sin(2*Y(1))-9.81*b*sin(Y(1)))/(a^2*(cos(Y(1)))^2+b^2*sin((Y(1)))^2);
//this is called into primary code with following syntax:
options=odeset('RelTol',1e-6,'AbsTol',1e-6,[1e-6 1e-6])
Y=[0;0];
[t,dif]=ode45('equ_mot',sim_t,Y,options)

thx all for your suggestions
Save
Cancel
Reply
 
x
OK