Hi,
I would like to plot the motion of a satellite in the x-y-plane around the Earth. For this motion I have the differential equation
. As initial conditions, I have and with two numerical values for r and v and I want to pass them to ode45 via
[t1, y1]=ode45('unperturbed', [0 100], [r0 v0]);
How does unperturbed have to look like so it can handle the vectors and returns a position vector for every time t?
So far I have it like this which seems to return valid y coordinates but I don't know how to get the x part.
function dy = unperturbed(t,y)M=5.594e24;G=6.674e-11;rE=6378.137;r0=rE+800;dy=zeros(2,1);dy(1) = y(2);dy(2) = -G*M*(dy(1)/r0^3);end
I hope you can help me with this
Best Answer