Error using odearguments (line 93)
MY_FUNCTION returns a vector of length 1, but the length of initial conditions vector is 2.
The vector returned by MY_FUNCTION and the initial conditions vector must have the same number of elements.
Error in ode45 (line 114)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in p3 (line 10)
[ts,xs]= ode45(@my_function,[0,10],[5,0])
function ys = my_function (t,y)
W= 50;
g= 32.2 ;
theta=(35*pi)/(180) ;
Mk=0.2;
L= 12 ;
ys = (( 3 ) *( ( (1-(Mk^2))* g* sin(y(1))) - ( 2*Mk*g*cos(y(1))) + (Mk*((y(2))^2)))) / ( L*(2-(Mk^2)));
W= 50;
g= 32.2 ;
theta=(35*pi)/(180) ;
Mk=0.2;
L= 12 ;
[ts,xs]= ode45(@my_function,[0,10],[5,0])
0 Comments
Sign in to comment.