Q:

# Examine the motion, or trajectory, of a projectile moving through the air. Assume that it has an initial height of 0, and neglect the air resistance for simplicity

Examine the motion, or trajectory, of a projectile moving through the air. Assume that it has an initial height of 0, and neglect the air resistance for simplicity. The projectile has an initial velocity v0, an angle of departure  0, and is subject to the gravity constant g = 9.81m/s2 . The position of the projectile is given by x and y coordinates, where the origin is the initial position of the projectile at time t = 0. The total horizontal distance that the projectile travels is called its range (the point at which it hits the ground), and the highest peak (or vertical distance) is called its apex. Equations for the trajectory can be given in terms of the time t or in terms of x and y. The position of the projectile at any time t is given by:

x = v0 cos( 0) t y = v0 sin( 0) t - ½ g t2 For a given initial velocity v0, and angle of departure  0, describe the motion of the projectile by writing a script to answer the following:  What is the range?  Plot the position of the projectile at suitable x values  Plot the height versus time.  How long does it take to reach its apex?

### All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch14Ex40.m

v0 = 33;

theta0 = pi/4;

t = 0;

g = 9.81;

xvec = [];

yvec = [];

[x, y] = findcoords(v0,theta0,t);

while y >= 0

xvec = [xvec x];

yvec = [yvec y];

plot(x,y)

hold on

t = t + 0.01;

[x, y] = findcoords(v0,theta0,t);

end

fprintf('The range is %.1f\n', xvec(end))

fprintf('The apex is %.1f\n', max(yvec))

findcoords.m

function [x, y] = findcoords(v0, theta0, t)

g = 9.81;

x = v0 * cos(theta0) * t;

y = v0 * sin(theta0) * t - 0.5 * g * t * t;

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)