Create Matlab script with following Screenshot and instructions HW 13 - Projectile Program To do: Complete the
Fantastic news! We've Found the answer you've been seeking!
Question:
Create Matlab script with following Screenshot and instructions
Transcribed Image Text:
HW 13 - Projectile Program To do: Complete the tasks requested below. For this homework, you may not use any pre-built MATLAB The program should include all values so long as y 2 0. functions to replace calculations. You may use any trigonometric functions, as well as the length, and zeros When the program is completed, the prompt and output should have the following format: 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: 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 Time Horizontal location Trajectory Information Vertical location x (t) y (t) vx (t) vy (t) v (t) o Horizontal velocity o Vertical velocity Total velocity 0.00 25.00 23.33 0.00 0.00 17.68 17.68 0.25 4.42 4.11 17.68 15.23 8.84 13.26 12.77 10.32 0.50 7.61 17.68 21.81 0.75 10.50 17.68 20.47 Maximum elevation 1.00 17.68 12.77 17.68 7.87 19.35 which matches the table provided below (note: do NOT use the table function). 18.49 17.92 17.69 1.25 22.10 14.43 17.68 5.42 1.50 26.52 15.48 17.68 2.96 1.75 2.00 30.94 15.91 17.68 0.51 The program should also determine maximum elevation. Assume frictionless flight (no aerodynamic drag). User inputs: 35.36 15.74 17.68 -1.94 17.78 2.25 2.50 39.77 14.94 17.68 -4.39 18.22 Units 44.19 13.54 17.68 -6.85 18.96 2.75 48.61 11.52 17.68 -9.30 19.97 Relevant gravitational value Initial velocity Launch angle (in degrees) Time increment (in seconds) 8.89 5.64 3.00 53.03 17.68 -11.75 21.23 3.25 57.45 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 The relevant kinematic equations in the vertical direction are: **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) vy = (vo)y + ayt 1 y = yo + (Vo)yt + ayt? 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 v,? = (vo); + 2a,(y – yo) code is doing and how); code properly suppressed (i.e. displaying results via fprintf() or a similar function). (Hint: you may not need to use all of these equations) Where ay is vertical acceleration, y is vertical displacement, t is time, v, is final vertical velocity, and (vo), is initial vertical velocity. On the earth's surface, a, = -32.2 :-9.81. or = The horizontal distance can be found as, x = xo + (vo),xt (vo)x = vx (In the x direction the initial and final velocities are equal.) where (vo)x is the initial velocity in the horizontal direction and t is time. Page 1/2 Page 2/2 HW 13 - Projectile Program To do: Complete the tasks requested below. For this homework, you may not use any pre-built MATLAB The program should include all values so long as y 2 0. functions to replace calculations. You may use any trigonometric functions, as well as the length, and zeros When the program is completed, the prompt and output should have the following format: 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: 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 Time Horizontal location Trajectory Information Vertical location x (t) y (t) vx (t) vy (t) v (t) o Horizontal velocity o Vertical velocity Total velocity 0.00 25.00 23.33 0.00 0.00 17.68 17.68 0.25 4.42 4.11 17.68 15.23 8.84 13.26 12.77 10.32 0.50 7.61 17.68 21.81 0.75 10.50 17.68 20.47 Maximum elevation 1.00 17.68 12.77 17.68 7.87 19.35 which matches the table provided below (note: do NOT use the table function). 18.49 17.92 17.69 1.25 22.10 14.43 17.68 5.42 1.50 26.52 15.48 17.68 2.96 1.75 2.00 30.94 15.91 17.68 0.51 The program should also determine maximum elevation. Assume frictionless flight (no aerodynamic drag). User inputs: 35.36 15.74 17.68 -1.94 17.78 2.25 2.50 39.77 14.94 17.68 -4.39 18.22 Units 44.19 13.54 17.68 -6.85 18.96 2.75 48.61 11.52 17.68 -9.30 19.97 Relevant gravitational value Initial velocity Launch angle (in degrees) Time increment (in seconds) 8.89 5.64 3.00 53.03 17.68 -11.75 21.23 3.25 57.45 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 The relevant kinematic equations in the vertical direction are: **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) vy = (vo)y + ayt 1 y = yo + (Vo)yt + ayt? 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 v,? = (vo); + 2a,(y – yo) code is doing and how); code properly suppressed (i.e. displaying results via fprintf() or a similar function). (Hint: you may not need to use all of these equations) Where ay is vertical acceleration, y is vertical displacement, t is time, v, is final vertical velocity, and (vo), is initial vertical velocity. On the earth's surface, a, = -32.2 :-9.81. or = The horizontal distance can be found as, x = xo + (vo),xt (vo)x = vx (In the x direction the initial and final velocities are equal.) where (vo)x is the initial velocity in the horizontal direction and t is time. Page 1/2 Page 2/2
Expert Answer:
Answer rating: 100% (QA)
MATLAB Code taking input from user unit inputPlease input the units being used m or ft g inputP... View the full answer
Posted Date:
Students also viewed these programming questions
-
Create a MATLAB Script to determine the voltage across the capacitor for t20. At t-0, the capacitor is initially charged showing 9v across the terminal, Choose R=2M2, C=2.3f a. i (t) + Va[t) Vslt)...
-
Create a SQL script containing your data definition language (DDL) statements to create your tables, views, triggers, and other required database objects for your project. Your script must also...
-
Calculate the warranty expense for 2017 using the following information: 2017 sales $ 500,000 The sales have a 2 year warranty with an estimate of returns in year 1 of 3% and in year 2 of 7%.
-
Cungs Dress Delivery operates a mail-order business that sells clothes designed for frequent travelers. It had sales of $610,000 in December. Because Cungs Dress Delivery is in the mail order...
-
Explain how operations management activities affect the customer experiences described in the Museum of Science + Technology anecdote at the beginning of this chapter. What moments of truth would a...
-
Assume all the information is the same as in Custom Freight Systems (A), but instead of receiving one outside bid, Logistics receives two. The new bid is from World Services for $195 per hundred...
-
You throw a \(100-\mathrm{g}\) ball upward with a speed of \(19.8 \mathrm{~m} / \mathrm{s}\). How much work does the force of gravity do on the ball during its trip to its maximum height?
-
Mason Companys cost structure contains a number of different cost behavior patterns. Following are descriptions of several different costs; match these to the appropriate graphs. On each graph, the...
-
Assuming a rate of return of 8%, calculate the monthly savings needed for education assuming that savings will continue until the children's college education is completed. Education Because of the...
-
Q1. Use the LIFO cost-flow assumption to answer the following questions. YEAR 1: Purchase #1 1,000 units @ $1 = $1,000 Purchase #2 1,000 units @ $1 = $1,000 a. How much is goods available for sale?...
-
What tool or method did you learn that you can see yourself applying in your work environment?
-
a. What is cost shifting? b. What is cross-subsidization?
-
Why are costs associated with carrying receivables?
-
How is the CCC interpreted?
-
What are liabilities?
-
Who are the primary users of financial statements?
-
The most effective approaches to impression management include which of these? Select all that apply. Question 18 options: maintain authenticity describe yourself accurately build credibility be true...
-
Question 6.10 Current and deferred tax worksheets and tax entries From the hip Ltd?s statement of profit or loss for the year ended 30 June 2007 and extracts from its statements of financial position...
-
The following are summaries of the cash book and bank accounts of J. Duncan who does not keep his books using the double entry system. You are required to: (a) Calculate the value of J. Duncan's...
-
Read the following and answer the questions below. On 31 December 2015 the bank column of C. Tench's cash book showed a debit balance of 1,500. The monthly bank statement written up to 31 December...
-
The bank columns in the cash book for June 2016 and the bank statement for that month for D. Hogan are as follows: You are required to: () Write the cash book up to date to take the above into...
Study smarter with the SolutionInn App