I am trying to graph velocity and since I am calculating the position at each time I thought I could just do this:
for t=2:40 theta = v*t; alfa = asin(C*sin(theta)/CL); x=C*cos(theta)+CL*cos(alfa); dv(t)= (x(t)-x(t-1))/t;endplot (theta, dv);
but I keep getting an index out of bounds error. Originally I was pulling from the first entry of a vector but when that didn't work I just called it a new variable x, but it didn't seem to help.
Best Answer