Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using MATLAB: The distance a projectile travels when fired at an angle theta is

ID: 642981 • Letter: U

Question

Using MATLAB:

The distance a projectile travels when fired at an angle theta is a function of time and can be
divided into horizontal and vertical distances.
H(t) = t Vo cos(theta)
V(t) = t Vo sin(theta) - 1/2 g t
2
H(t) and V(t) are the distance traveled in x and y direction. Vo = 100 m/s is the initial velocity, g
= 9.81 m/s2
and t is the time, 0 <t < 20 sec.
Calculate the vertical (V1, V2 and V3) and horizontal (H1, H2, H3) distances traveled for angles
pi/2, pi/4 and pi/6. Graph horizontal distances in x-axis and vertical distances in y-axis for all
three cases. You will have three lines, make one solid, one dashed and one dotted. Add a
legend to identify which line is which.

Explanation / Answer

>> t = [0:20];

>> V = 100;

>> g = 9.81;

>> H1 = t*V*cos(pi/6);

>> V1 = t*V*sin(pi/6)-(1/2)*g*t.^2;

>> H2 = t*V*cos(pi/4);

>> V2 = t*V*sin(pi/4)-(1/2)*g*t.^2;

>> H3 = t*V*cos(pi/2);

>> V3 = t*V*sin(pi/2)-(1/2)*g*t.^2;

>> plot(H1,V2, H2,V2,':', H3,V3,'--')

>> axis([-100 2000 0 600])

>> legend('H1 V1', 'H2 V2', 'H3 V3')

>> title('Projectile Distance'); xlabel('Horizontal Distance'); ylabel('Vertical Distance')

                                                                                    >> axis([-100 2000 -600 500])

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote