Question

2. The trajectory motion of a projectile is given as a function of time. x(t) = (V, cost 1 y(t) = (v, sin(O)t - 5 gta where x

I have no idea what to do. Can you please include the code with it? Thanks!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc
clear all

g = 32.17; % ft/s^2
v0 = 200; % ft/s
thetad = [30 37.5 45 ]; % theta in degree
theta = deg2rad(thetad); % theta in radian
color = ['r','k','b'];

%% --(a)--
% tf = time of flight
% at t =tf, projectile will fall back to ground
% Hence, to find tf, we have to evalueate y = 0 such taht t>0 (root other
% than t = 0
syms t
for i =1:length(theta)
y = v0*sin(theta(i))*t-0.5*g*t^2;
tf(i) = solve([y==0,t>0],t);
end
tf = double(tf); % converting sym to double
clc
for i = 1:length(theta)
fprintf('time of flight tf%i = %0.3f second\n',i,tf(i));
end
%% --(b)--
x = [];
figure
hold on
for i =1:length(thetad)
t = linspace(0,tf(i),500);
x = [x; v0*cos(theta(i))*t];
plot(t,x(i,:),color(i));
end
grid on
xlabel('time(s)');
ylabel('horizantal distance (ft)');
legend('x_1(t)','x_2(t)','x_3(t)','Location','north');
%% --(c)--
y = [];
figure
hold on
for i =1:length(thetad)
t = linspace(0,tf(i),500);
y = [y; v0*sin(theta(i))*t-0.5*g*t.^2];
plot(t,y(i,:),color(i));
end
grid on
xlabel('time(s)');
ylabel('vertical distance (ft)');
legend('y_1(t)','y_2(t)','y_3(t)');
ylim([0 350]);
%% --(d)--
figure
hold on
for i =1:length(theta)
plot(x(i,:),y(i,:),color(i));
end
grid on
xlabel('x(t) ft');
ylabel('y(t) ft');
legend('\theta_1=30 degree','\theta_2=37.5 degree','\theta_3=45 degree');
ylim([0 350]);

Command Window time of flight tfl = 6.217 second time of flight tf2 = 7.569 second time of flight tf3 = 8.792 second350 . 0,=30 degree 8=37.5 degree 6,=45 degree 300 ...... 250 ....... y(t) ft 50 ...../. 200 400 600 800 1000 1200 1400 x(t) f1400 *g(t) 1200 ...... xz(t) 1000 ....... horizantal distance (ft) 200 ....... 2 w time(s)350 . 300 ...... 250 ....... vertical distance (ft) 100 ... 50 .....// w time(s)

Add a comment
Know the answer?
Add Answer to:
I have no idea what to do. Can you please include the code with it? Thanks!...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • These questions are to be answered using MATLAB. I only need #3 answered, but #1 provides...

    These questions are to be answered using MATLAB. I only need #3 answered, but #1 provides information (like initial velocity, etc.) required for the questions. I think I have it done, but I'd like to see if there are other ways to use MATLAB for this question. PROJECTILES The distance a projectile travels when fired at an angle 8 is a function of time and can be divided into horizontal and vertical distances. Horizontal (1) = 1.V.cos(0) Vertical(t) = 1•...

  • I want the math lab code for theses problems in a unique way

    I want the math lab code for theses problems in a unique way Theory A projectile is launched from point A up an incline plane that makes an angle of 10 with the horizontal. The mountain is 6,000 m high. Vo 10° Figure 1: Flightpath of a projectile. If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle θ of departure relative to the horizontal is a parabola (see...

  • How to do this question using while loop only? What happens if you try to pay...

    How to do this question using while loop only? What happens if you try to pay less than $5 per month? In Chapter 1, we studied the problem of a projectile being launched at an angle of theta at an initial velocity of v. The equations for the height h and horizontal location x as functions of time t are as follows: h(t) = vt sin theta - 1/2 gt^2 x(t) = vt cos theta Write a MATLAB program to...

  • MATLAB, please provide code script Objective: Create a function file that animates projectile motion defined by...

    MATLAB, please provide code script Objective: Create a function file that animates projectile motion defined by the following equations in a subplot. Your function should accept user inputs of launch speed and launch angle. The output of your function will be a top subplot that displays height (y) as a function of x. The bottom subplot should display the vertical velocity while the projectile is in motion. A video of what your animation should look like is posted with this...

  • THE EXPERIMENT The speed "." of a ball as it leaves the spring gun will be...

    THE EXPERIMENT The speed "." of a ball as it leaves the spring gun will be measured by projecting the ball horizontally (0-0) from a table top at a distance H above the floor. The gun is then elevated at a known angle 8. The position of the target is calculated using the measured value of v. calculated time of flight, and the equations of motion. A successful prediction with the projectile hitting the target means that the following concepts...

  • EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal...

    EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal direction and with an initial speed of 40 m/s. (A) How do the vertical and horizontal components of the projectile's velocity vary with time? (B) How long does it remain in flight? (C) For a given launch speed, what launch angle produces the longest time of flight? CONCEPTUALIZE Consider the projectile to be a point mass that starts with an initial velocity, upward and...

  • 3.) MATH: Show mathematically that R is maximum for 8-45 for this h-0 case 4) CONCEPTS...

    3.) MATH: Show mathematically that R is maximum for 8-45 for this h-0 case 4) CONCEPTS Let's now soescsetsalk explore why all 0 45 produce less range (for he-o) The three initial velocity vectors below are all of the same size, indicating the same launch speed However, the launch angles are varied. Vi Vi 0-45° Case I c45 Case II e>450 Case III a.) In the figure above, draw (to sale) the horizontal (v.) and vertical (V.,) components for each...

  • Could somebody help me with this question for the coding on MATLAB? Thank you Projectile Motion...

    Could somebody help me with this question for the coding on MATLAB? Thank you Projectile Motion The distance a projectile travels when fired at an angle Θ is a function of time and can be divided into horizontal distance, dVotcos(O) and the vertical distance is dy Vot sin(0)-0.5gt2. Suppose a projectile is fired at an initial velocity of 100 m/s and a launch angle of /4 radians (45°). Use ezplot to graph horizontal distance on the x -axis and vertical...

  • (Please show the steps to the solutions, and draw a diagram if you can) 1) In...

    (Please show the steps to the solutions, and draw a diagram if you can) 1) In a linear motion, velocity changes with time as Find distance and displacement for the time interval from 1.5 s to 5 s. 2) A projectile is launched from the edge of 50 m high vertical cliff at an angle of above horizontal. The projectile hits the ground at a distance of 150 m from the bottom of the cliff. FInd the initial and final...

  • hi can you sovle this problem and do the matlab code please. thanks Problem #1 From ECE 102 Engineering Computation...

    hi can you sovle this problem and do the matlab code please. thanks Problem #1 From ECE 102 Engineering Computation textbook-, problem #1, page 126: Note: C is coulombs of charge, A is amperes of current The flow of charge in a conductor varies with time according to the function g(t)=(1-3,-)C a) Ifk -0.1s, find the current atl e Express your result rounded to 3 decimal places dt b) What is the current for very large values of time r?...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT