Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would I run this in MATLAB? E Progress Review Three Google t-content-rid-264756439 2/courses/NR27SEGR 115 MI SPI 9/Hw%206%20 %20Projectie%20Program pdf HW 6- Projectile Program To
How would I run this in MATLAB?
E Progress Review Three Google t-content-rid-264756439 2/courses/NR27SEGR 115 MI SPI 9/Hw%206%20 %20Projectie%20Program pdf HW 6- Projectile Program To do: Complete the tasks requested below. For this homework, you may not use any pre-built MATLAB functions to replace calculations. You may use any trigonometric functions, as well as the length, and zeror functions if you wish. Be sure to use the proper naming convention for the script files (HW6 LastName). Develop a MATLAB script file which will determine the trajectory of a projectile as a function of time. The output of the program should be a table of e o Time o Horizontal location o Vertical location o Horizontal velocity o Vertical velocity o Total velocity o Maximum elevation which matches the table provided below (note: do NOT use the table function). The program should also determine maximum elevation. Assume frictionless flight (no User inputs: acrodynamic drag) o Units o Relevant gravitational value o Initial velocity o Launch angle (in degrees) o Time increment (in seconds) The relevant kinematic equations are (Hint: you may not need to use all of these equations) Where a is acceleration, d is displacement, t is time, y, is final velocity, and Vo is initial velocity The horizontal distance can be found as Page 1/2 where Var is the initial velocity in the horizontal direction and t is time. Additionally, the vertical distance can be found as, ()o g20, (2) where voy is the initial velocity in the vertical direction and g is the acceleration of gravity. The program should include all values so long as y(O20 When the program is completed, the prompt and output should have the following format: Please input the units being used (m or Et):m Please input the corresponding value for gravity: 9.81 Please input the initial velocity: Please input launch angle in degrees: 45 Please input the time increment in seconds: .25 Trajectory Information x (t) y (t) vx (t) Vy (t) v (t) 0.00 0.00 0.00 17.68 17.68 25.00 0.25 4.42 4.11 17.68 15.23 23.33 0.50 8.84 7.61 17.68 12.77 21.81 0.75 13.26 10.50 17.68 10.32 20.47 19.35 1.25 22.10 14.43 17.685.42 18.49 1.50 26.52 15.4817.68 2.96 17.92 1 17.69 2.00 1 35.36 15.74 17.68 -1.9417.78 -4.39 18.22 2.50 44.19 13.54 17.68 6.8518.96 2.75 I 48.61 11.521 17.681-9.301 19.97 3.00 53.03 I 8.89 17.68 11.75 21.23 5.64 17.68 14.20 22.68 3.50 61.87 1.79 17.68 16.6624.29 17.68 12.77 17.68 7.87 1.75 30.94 15.91 17.68 0.51 2.251 39,771 14,941 17.68 3.25 57.45 I The maximum recorded elevation is 15.91 m * "Note: You must store the user inputs for units and use it in your output statement (aka the user must be able to enter any set of numbers or units they wish). Additionally, make sure that the maximum recorded elevation is the simulated elevation not a calculated elevation (meaning, the maximum elevation from your program may not be the actual maximum elevation of the projectile)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started