The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help to finish this. It would be best if anyone can solve this problem. its due in a free hours. Thank you.
HW2: MATLAB loops, nesting, and simulation/modeling (100pts) To be completed and submitted by 8:00 AM on Thursday, September 15th, via the assignment link on your class’ Blackboard website, under the ‘Assignments’ tab. To do: Complete the tasks requested below. For this homework, you may not use any prebuilt MATLAB functions to replace calculations. You may use any trigonometric functions, as well as the length, and zeros functions if you wish. Be sure to use the proper naming convention for the script files (HW#part#_LastName.m), and for any PDFs created (HW#_LastName). ● Part 1a: Develop a flowchart and 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: o Time o Horizontal location o Vertical location o Horizontal velocity o Vertical velocity o Total velocity which matches the table provided below (note: do NOT use the table function). The program should also determine maximum elevation. Assume frictionless flight (no aerodynamic drag). User inputs: o Units o Relevant gravitational value o Initial velocity o Launch angle (in degrees) o Time increment (in seconds) The relevant kinematic equations are v = v0 + at d = vot + (12)at2 vf2 = v02 + 2ad Where a is acceleration, d is displacement, t is time, vf is final velocity, and v0 is initial velocity. The horizontal distance can be found as, x(t) = v0xt, (1) where v0x is the initial velocity in the horizontal direction and t is time. Additionally, the vertical distance can be found as, y(t) = v0yt − 12 gt2≥0, (2) where v0y 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(t)≥0. When the program is completed, the prompt and output should have the following format: Please input the units being used (m or ft): m Please input the corresponding value for gravity: 9.81 Please input the initial velocity: 25 Please input launch angle in degrees: 45 Please input the time increment in seconds: .25 Trajectory Information t 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 1.00 | 17.68 | 12.77 | 17.68 | 7.87 | 19.35 1.25 | 22.10 | 14.43 | 17.68 | 5.42 | 18.49 1.50 | 26.52 | 15.48 | 17.68 | 2.96 | 17.92 1.75 | 30.94 | 15.91 | 17.68 | 0.51 | 17.69 2.00 | 35.36 | 15.74 | 17.68 | 1.94 | 17.78 2.25 | 39.77 | 14.94 | 17.68 | 4.39 | 18.22 2.50 | 44.19 | 13.54 | 17.68 | 6.85 | 18.96 2.75 | 48.61 | 11.52 | 17.68 | 9.30 | 19.97 3.00 | 53.03 | 8.89 | 17.68 | 11.75 | 21.23 3.25 | 57.45 | 5.64 | 17.68 | 14.20 | 22.68 3.50 | 61.87 | 1.79 | 17.68 | 16.66 | 24.29 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 ● ● Part 1a1: Include a wellreasoned statement justifying why we might want the maximum simulated elevation versus the calculated elevation (34 sentences). Part 1b: Modify the code from your previous assignment (HW 1 Review Assignment, part 1c) to take in a known/fixed number of grades specified by the user beforehand and find and display to the user: o What percentage of the grades are more than 1 standard deviation from the mean. You may not use a while loop for this code. Submission: Submit a single PDF, and two .m files. The PDF should contain: ●
●
●
● The flowchart for the code from part 1a The listing of the code for both parts Your answer to the question about simulated vs calculated elevation Screenshots of the command window showing the results (1a and 1b) of the code being run for above test case for part 1a, and the vector [50 80 85 82 97 98 16 34 100 82 84 83] for part 1b. Note: The flowchart may be handwritten, as long as they are neat and legible. For flowchart rules, you may wish to refer to the flowchart guidelines document on Blackboard.