Hey there, I am trying to numerically integrate an equation, store the values of each iteration, then plot the saved values. After asking my professor, he said I needed to set up an array within my loop that has a counter (say i). I also need a vector to store the time for each iteration. I am insanely stuck and have run out of options. Can you help me?
Here is the for loop of my program
for i = 1:300
t = 1:300;
f = [V_vector; (-mu/R_p^3)*R_vector] ;
X = X_0 +f*t;
V(i) = sqrt(V(1)^2+V(2)^2);
R_perifocal = R(i);