Question

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 horizont

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

1 - clc, clear, close all 2 3 4 5 - %% PART 1. g = 9.8; 3 m/s^2 Vo = 100; m/s theta = pi/4; radians t = linspace(0,20,100); $23 24 25 & PART 3 $ initialize the launch angles thetal = pi/3; theta2 pi/4; theta3 = pi/6; 26 27 - w w N N N N N N 28 29 30Plot of Horizontal distance vs time 1500 1000 Horizontal distance [m] 500 0 0 2 4 6 8 10 12 14 16 18 20 time [s]Plot of Vertical distance vs time 300 200 100 o Verticle distance [m] -200 -300 -400 -500 -600 0 4 6 8 10 12 14 16 18 N 20 tiPlot of Verticle vs Horizontal distances 300 200 100 0 Verticle distance [m] -200 -300 -400 -500 -600 0 1500 500 1000 HorizonPlot of Verticle vs Horizontal distances, varying launch angles 400 theta = pi/3 theta = pi/4 200 theta = pi/6 -200 Vertical

clc,clear,close all

%% PART 1.
g = 9.8; % m/s^2
Vo = 100; % m/s
theta = pi/4; % radians
t = linspace(0,20,100); % s. Using 100 points. The more points, the better

Horizontal = t * Vo * cos(theta);
Vertical = t * Vo * sin(theta) - 0.5 * g * t.^2;

figure,plot(t,Horizontal),title('Plot of Horizontal distance vs time')
xlabel('time [s]'),ylabel('Horizontal distance [m] '),grid on

figure,plot(t,Vertical),title('Plot of Vertical distance vs time')
xlabel('time [s]'),ylabel('Verticle distance [m]'),grid on

%% PART 2
figure,plot(Horizontal,Vertical)
title('Plot of Verticle vs Horizontal distances')
xlabel('Horizontal distance [m]'),ylabel('Verticle distance [m]'),grid on

%% PART 3
% initialize the launch angles
theta1 = pi/3;
theta2 = pi/4;
theta3 = pi/6;

% computing the vertical distances for different values of theta
v1 = t * Vo * sin(theta1) - 0.5 * g * t.^2;
v2 = t * Vo * sin(theta2) - 0.5 * g * t.^2;
v3 = t * Vo * sin(theta3) - 0.5 * g * t.^2;

% computing the horizontal distances for different values of theta
h1 = t * Vo * cos(theta1);
h2 = t * Vo * cos(theta2);
h3 = t * Vo * cos(theta3);

% plotting results
figure,plot(h1,v1,'-',h2,v2,'--',h3,v3,'.'),grid on
title('Plot of Verticle vs Horizontal distances, varying launch angles')
legend('theta = pi/3','theta = pi/4','theta = pi/6')
xlabel('Horizontal distance [m]'),ylabel('Vertical distance [m]')


------------------------------------------------------------------------------
COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,

IF YOU'RE SATISFIED, GIVE A THUMBS UP
~yc~

Add a comment
Know the answer?
Add Answer to:
These questions are to be answered using MATLAB. I only need #3 answered, but #1 provides...
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
  • 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...

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

    I have no idea what to do. Can you please include the code with it? Thanks! 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 is the horizontal distance or down range of the projectile in feet y is the vertical motion or height of the projectile in feet ve is the initial velocity = 200 ft/s O is the angle...

  • 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...

  • 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...

  • MATLAB You Cannot Use guide, You must create a GUI using code only Problem 1 (100...

    MATLAB You Cannot Use guide, You must create a GUI using code only Problem 1 (100 pts) This week you will repeat the second problem from Week 8 (the problem is restated below for your convenience) but you will add a GUI (without using guide) for the user to control the execution of the program. Your program should do the following: Create a figure that contains a plotting area and user interface controls Allow the user to input the initial...

  • Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial...

    Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously...

  • Problem 7 4. A projectile of mass 9.6 kg is launched from the ground with an...

    Problem 7 4. A projectile of mass 9.6 kg is launched from the ground with an initial velocity of 12.4 m/s at angle of 54° above the horizontal (see the figure). At some time after its launch, an explosion splits the projectile into two pieces. One piece, of mass 6.5 kg, is observed at 1.42 seconds after the launch to be at a height of 5.9 m and at a horizontal distance of 13.6 m from the launch point Find...

  • 1 2 A projectile PA is launched from point A towards the east with an initial launch velocity ves and an initial launch angle of 8aA. The impact point of the projectile Pa is a point B in a valle...

    1 2 A projectile PA is launched from point A towards the east with an initial launch velocity ves and an initial launch angle of 8aA. The impact point of the projectile Pa is a point B in a valley with an ordinate, you, located below the elevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile Pa ts launched simultaneously towards the west to intercept the incoming projectile PA. Projectile...

  • Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the...

    Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the motion of an object projected into the air at an angle. The object flies in the air until the projectile returns to the horizontal axis (x-axis), where y=0. This MATLAB program should allow the user to try to hit a 2-m diameter target on the x-axis (y=0) by varying conditions, including the lunch direction, the speed of the lunch, the projectile’s size, and the...

  • Use Matlab... Use given variables... %Set values of parameters H0 = 4000 ; v0 = 0; vplane = 38.9...

    Use Matlab... Use given variables... %Set values of parameters H0 = 4000 ; v0 = 0; vplane = 38.9; vwind = 7.0; g = -9.81; td = 45; dt = 0.1; %initial conditions %To minimize edits, let v = vertical velocity, and vx = horizontal velocity y(1) = H0; v(1) = v0; t(1) = 0; x(1) = 0; vx(1) = vplane; %loop until parachutist reaches the ground %Calculate te horizontal distance traveled before and after the parachute opens d_free =...

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