To do: Complete the tasks requested below. For this homework, you may not use any pre-built...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 zeros functions if you wish. Be sure to use the proper naming convention for the script files (HW13_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: 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 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 (Hint: you may not need to use all of these equations): Where is acceleration, is displacement, is time, is final velocity, and is initial velocity. The horizontal distance can be found as, where is the initial velocity in the horizontal direction and is time. Additionally, the vertical distance can be found as, where is the initial velocity in the vertical direction and is the acceleration of gravity. The program should include all values so long as When the program is completed, the prompt and output should have the following format: 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 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 (meaning, the maximum elevation from your program may not be the actual maximum elevation of the projectile) Submission: Submit one m-file including the following: header (see syllabus); Short description of what the program does (in your own words); Descriptive comments for most lines (Should be specific and demonstrate that you understand what the code is doing and how); code properly suppressed (i.e. displaying results via fprintf() or a similar function). 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 zeros functions if you wish. Be sure to use the proper naming convention for the script files (HW13_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: 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 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 (Hint: you may not need to use all of these equations): Where is acceleration, is displacement, is time, is final velocity, and is initial velocity. The horizontal distance can be found as, where is the initial velocity in the horizontal direction and is time. Additionally, the vertical distance can be found as, where is the initial velocity in the vertical direction and is the acceleration of gravity. The program should include all values so long as When the program is completed, the prompt and output should have the following format: 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 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 (meaning, the maximum elevation from your program may not be the actual maximum elevation of the projectile) Submission: Submit one m-file including the following: header (see syllabus); Short description of what the program does (in your own words); Descriptive comments for most lines (Should be specific and demonstrate that you understand what the code is doing and how); code properly suppressed (i.e. displaying results via fprintf() or a similar function).
Expert Answer:
Answer rating: 100% (QA)
CODE A Matlab script file for projectile motion determine the position and velocity components for the duration of time the projectile is in flight also provide the max elevation for the projectile cl... View the full answer
Posted Date:
Students also viewed these programming questions
-
For this homework you will be making a maze solver. Your program will take in from a file 2 things. The size of the square maze, and the maze itself. The maze will consists of numbers between 0 and...
-
Before attempting this project, be sure you have completed all of the reading assignments, hands-on labs, discussions, and assignments to date. Design a Java class named Guitar that contains: A...
-
If Vx = 6.80 units and Vy = 7.40 units, determine the magnitude and direction of V.
-
Suppose you want to buy a house that is sold by way of a first-price sealed bid auction. In contrast to the model in the lecture, there are more than 2 players. Players simultaneously and...
-
The cost of repairing cars involved in accidents is one reason that insurance premiums are so high. In an experiment, 10 cars were driven into a wall. The speeds were varied between 2 and 20 mph. The...
-
The system shown is initially at rest. Neglecting the masses of the pulleys and the effect of friction in the pulleys, determine (a) The acceleration of each block, (b) The tension in eachcable. 20...
-
Construct your key relations chart for this chapter.
-
Potter Company has installed a JIT purchasing and manufacturing system and is using back ush accounting for its cost flows. It currently uses a two-trigger approach with the purchase of materials as...
-
What is the present value of $ 1 , 7 0 0 due in 1 4 years at a 4 percent interest rate and 1 0 percent interest rate? Do not round intermediate calculations. Round your answers to the nearest cent....
-
Blue Angel Investors has a success ratio of 10% with its venture funding. Blue Angel requires a rate of return of 20% for its portfolio of lending, and the average length on its loan is five years....
-
Encik Zharif owns a gift shop, Zharif Gift Shop at Queensbay Mall. The shop sells variety of local and imported goods. The following Trial Balance was extracted from the books of Zharif Gift Shop on...
-
Delivering Bad News a. List in order the 5 components of a bad news message: closing paragraph, counter proposal, explanation, bad news statement, introductory paragraph. b. Provide some examples of...
-
Mr. Max Kassitta, married to Marta Kassitta with two children, had two Insurance policies, one a "life policy" with OMS Mutual (valued at N$ 850 000) and the other a "work accident insurance" with...
-
A surveyor uses a steel tape measure that is 5 0 . 0 0 0 meters long at a temperature of 2 0 . 0 degrees C . When it is a hot summer day the temperature is 3 5 . 0 degrees Celsius. What is the length...
-
Your fixed cost is $524,000, your sales price is $1,750/unit, and your variable cost is $938/unit. If you lower the sales price to $1,700, what impact will that have on the number of units must you...
-
Read the following articles https://www.themarshallproject.org/2015/03/31/public-shamingsLinks to an external site. For Shame! Public Shaming Sentences on the Rise | Prison Legal NewsLinks to an...
-
CC&R's are essentially made by a landowner about how the property will or will not be used that are enforceable through the court system by the parties that expect to benefit from the promises. Real...
-
What is the back work ratio? What are typical back work ratio values for gas-turbine engines?
-
The _________ curve for a product is the horizontal summing of the demand curves of the individuals in the market.
-
A change in _________ leads to a change in quantity demanded, illustrated by a(n) _________ demand curve.
-
An individual _________ curve reveals the different quantities of a particular good a person would be willing and able to buy at various possible prices in a particular time interval, other things...
Study smarter with the SolutionInn App