Hello fellow community
I want to solve an ODE for particle trajectory;
function dpos = Throw(pos) mu = 1;g = 10;dpos(1) = pos(3);dpos(2) = pos(4);dpos(3) = -mu * pos(3)* sqrt(pos(3)^2 + pos(4)^2);dpos(4) = -g - mu * pos(4) * sqrt(pos(3)^2 + pos(4)^2);end
and there is a problem i encountered right in the beginning:
ode45(@Throw,[0 2],[0 1 1 1])
Error using Throw
Too many input arguments.
Error in odearguments (line 90)
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Your help will be apreciated.
Jan
Best Answer