i wrote this code, but i have error i dont know why !
x0=[0,10,45];
tspan=[0,30];
u=10;
[t,x]=ode45(@rolling,tspan,x0,[],u);
subplot(2,2,1)
plot(t,x(:,1))
ylabel('lamda (deg)')
subplot(2,2,2)
plot(t,x(:,2))
ylabel('P (deg/sec)')
subplot(2,2,3)
plot(t,x(:,3))
ylabel('phi (deg)')
subplot(2,2,4)
plot(t,x(:,4))
ylabel('Voltage (V)')
the error is:
Error using odearguments (line 93)
ROLLING must return a column vector.
Error in ode45 (line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in problem2_b (line 10)
[t,x]=ode45(@rolling,tspan,x0,[],u);
0 Comments
Sign in to comment.