Good evening,
I am new to matlab, and was wondering if someone could look at my code to see if I am incorrectly using/missing some sort of math operator (i.e. I've noticed sometimes you need a ./ verses a / for divison).
My code produces a table however, the time of flight column should be consistantly increasing in a value, and my striking velocity values are too large. I am wondering if I am missing something in my code.
Thank you for your assistance
Below is my code:
k3 = 0.5;
Vx_o = 2296;
t = 0;
for i = 1:6
x(i) = (i-1)*200*3;
Vx(i) = (sqrt(Vx_o) - ((k3/2)*x(i)))^2;
t(i) = (x(i)/Vx_o)*sqrt(Vx_o/Vx(i));
end
T = table(x(:)/3, x(:), Vx(:), t(:), 'VariableNames',{'yards', 'feet', 'striking velocity', 'time of flight'})
0 Comments
Sign in to comment.