Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need to plot graphs for functions in matlab OCBCGOG is H-MODROU CENU FH Ger ce.com ... * 7 Ways To Make M... Prior Service Enlist...

image text in transcribed

image text in transcribed

need to plot graphs for functions in matlab

OCBCGOG is H-MODROU CENU FH Ger ce.com ... * 7 Ways To Make M... Prior Service Enlist... JH Military Career Exit... Homework 1 Comp. Apps 1 (50 pts) Problem 1 (34pts) 1. The objective of the first problem is to write a MATLAB program that computes and display the path of a projectile for a given initial position (XY ), initial velocity (V) and initial angle (6) See figure below (1) Coordinates projectile reach max elevation 1 C / A 1.- 1b core ry) . > coordinates projectile reach ground (y=0) Vertical motion The vertical motion is given by Qy = -8 -9.81 m sa (vertical acceleration) V = Voy+ ayr (vertical velocity, where Vay: initial velocity in the y direction) y = y + Vay?+ 0.5 ayl (vertical position, yo: initial position) t is the variable for time. Horizontal motion ax = 0 m/s2 (acceleration in the x-direction is equal to zero) V = Vax (horizontal velocity, where Vor initial velocity in the x-direction) x = xo + Vox (vertical position, Xo: initial x-position) Specific initial conditions For this homework we will consider these initial conditions (all Initial position: Xo = 0 and yo = 2 m Initial velocity V. = 15 m/s We are going to consider (simulate) two angles first = 45 deg, and then = 65 deg. For the time variable create a time vector, that starts from zero to 3 seconds in steps of 0.01 sec Compute the vertical and horizontal motion, You should divide the MATLAB scripts into different section so it is easier to read. Also, add comments to the variables that you create or the different steps that you are doing Remember that sin and coso functions are for radians and sind and condo for degrees Note that is a vector so take care when you need to use exponents for element-by-element UG ISH-MODAL U FAG e.com -... * 7 Ways To Make M... Prior Service Enlist... JH Military Career Ex First simulate the projectile path for 8 = 45 deg la) Plot x-position vs. y position. Include labels for X- and y-axis 1b) Plot y position (y-axis) vs. time in the x-axis). Include labels for x- and y-axis 1c) Plot y-velocity (V) vs. time. Include labels for x- and y-axis 1d) Estimate the x and y position and the time when the projectile reach the maximum elevation (x1yl) in the figure. You can use the built-in function max le) Estimate the x position and time when the projectile hit the ground (when y cross from positive to negative, y=-0. (x2y2) in the figure Note that we don't have any condition to check when the object hit the ground or not. So, the simulation will compute negative position in the y-direction. We will do that later on :) Second simulation = 65 deg Repeat the simulation but now considering = 65 deg. 1f Repeat the graphs la but now for 8 = 65 deg. 1g. Repeat the graphs 1b but now for 8 = 65 deg 1h. Repeat the graphs lc but now for = 65 deg (Optional: Note if you want you can include graphs la&f 1b&g, and lc&h in one graph with different colors and identifying both curves) 11) Repeat calculation on 1d) but with 8 = 65 deg 11) Repeat calculation on le) but with = 65 deg For the homework upload your script and a word document with the graphs and results for maximum elevation and when the projectile "hit" the ground. (Problem 2 next page) OCBCGOG is H-MODROU CENU FH Ger ce.com ... * 7 Ways To Make M... Prior Service Enlist... JH Military Career Exit... Homework 1 Comp. Apps 1 (50 pts) Problem 1 (34pts) 1. The objective of the first problem is to write a MATLAB program that computes and display the path of a projectile for a given initial position (XY ), initial velocity (V) and initial angle (6) See figure below (1) Coordinates projectile reach max elevation 1 C / A 1.- 1b core ry) . > coordinates projectile reach ground (y=0) Vertical motion The vertical motion is given by Qy = -8 -9.81 m sa (vertical acceleration) V = Voy+ ayr (vertical velocity, where Vay: initial velocity in the y direction) y = y + Vay?+ 0.5 ayl (vertical position, yo: initial position) t is the variable for time. Horizontal motion ax = 0 m/s2 (acceleration in the x-direction is equal to zero) V = Vax (horizontal velocity, where Vor initial velocity in the x-direction) x = xo + Vox (vertical position, Xo: initial x-position) Specific initial conditions For this homework we will consider these initial conditions (all Initial position: Xo = 0 and yo = 2 m Initial velocity V. = 15 m/s We are going to consider (simulate) two angles first = 45 deg, and then = 65 deg. For the time variable create a time vector, that starts from zero to 3 seconds in steps of 0.01 sec Compute the vertical and horizontal motion, You should divide the MATLAB scripts into different section so it is easier to read. Also, add comments to the variables that you create or the different steps that you are doing Remember that sin and coso functions are for radians and sind and condo for degrees Note that is a vector so take care when you need to use exponents for element-by-element UG ISH-MODAL U FAG e.com -... * 7 Ways To Make M... Prior Service Enlist... JH Military Career Ex First simulate the projectile path for 8 = 45 deg la) Plot x-position vs. y position. Include labels for X- and y-axis 1b) Plot y position (y-axis) vs. time in the x-axis). Include labels for x- and y-axis 1c) Plot y-velocity (V) vs. time. Include labels for x- and y-axis 1d) Estimate the x and y position and the time when the projectile reach the maximum elevation (x1yl) in the figure. You can use the built-in function max le) Estimate the x position and time when the projectile hit the ground (when y cross from positive to negative, y=-0. (x2y2) in the figure Note that we don't have any condition to check when the object hit the ground or not. So, the simulation will compute negative position in the y-direction. We will do that later on :) Second simulation = 65 deg Repeat the simulation but now considering = 65 deg. 1f Repeat the graphs la but now for 8 = 65 deg. 1g. Repeat the graphs 1b but now for 8 = 65 deg 1h. Repeat the graphs lc but now for = 65 deg (Optional: Note if you want you can include graphs la&f 1b&g, and lc&h in one graph with different colors and identifying both curves) 11) Repeat calculation on 1d) but with 8 = 65 deg 11) Repeat calculation on le) but with = 65 deg For the homework upload your script and a word document with the graphs and results for maximum elevation and when the projectile "hit" the ground. (Problem 2 next page)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions