Define a function named hv that takes three input parameters: h0 the initial height in meters...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a function named hv that takes three input parameters: h0 the initial height in meters vo the initial velocity in meters/sec t the time in seconds The function returns 2 output parameters: h the height at timet v the velocity at time t Write a main program that prompt the user for an initial height and velocity, then in a while loop asks the user to enter a time, and calls the function to compute and print the height and velocity at the inputted time. Repeat the process of getting new times (continue to use the same ho and vo originally entered) and computing and printing height and velocity using each new entered time until the user enters a time that is zero or less. Only new times are entered in the loop, the initial height and velocity are only entered once, before the loop The equations are: v = v0 - 9.81*t h= h0+ v0 -0.5*9.81*t2 Define a function named hv that takes three input parameters: h0 the initial height in meters vo the initial velocity in meters/sec t the time in seconds The function returns 2 output parameters: h the height at timet v the velocity at time t Write a main program that prompt the user for an initial height and velocity, then in a while loop asks the user to enter a time, and calls the function to compute and print the height and velocity at the inputted time. Repeat the process of getting new times (continue to use the same ho and vo originally entered) and computing and printing height and velocity using each new entered time until the user enters a time that is zero or less. Only new times are entered in the loop, the initial height and velocity are only entered once, before the loop The equations are: v = v0 - 9.81*t h= h0+ v0 -0.5*9.81*t2
Expert Answer:
Answer rating: 100% (QA)
Matlab code function hv hvh0v0tfunction vv0981tteq as mentioned ... View the full answer
Related Book For
Posted Date:
Students also viewed these operating system questions
-
In VBA define a function named spaghetti, where spaghetti - (x + 8)". Variable x must be taken as integers and the output of function spaghetti should be an integer. (15%) (a) If farfalle is a...
-
Define a function named Rotate that takes a string as input and returns a copy of that string in which all characters are rotated one position to the left. This means that the second character should...
-
Define a function named PigLatin that takes a string as input and returns the Pig Latin translation. For example, the call PigLatin('oops') should return 'oopsway', whereas PigLatin('foo') should...
-
A lightweight, rigid beam 10.0 m long is supported by a cable attached to a spring of force constant k = 8.25 kN/m as shown in Figure P12.38. When no load is hung on the beam (Fg = 0), the length L...
-
Let f (x1, x2) be a joint p.d.f. Suppose that (X(i)1 , X(i)2) has the joint p.d.f. f . Let (X(i+1)1, X(i+1)2) be the result of applying steps 2 and 3 of the Gibbs sampling algorithm on page 824....
-
How are discount functions in behavioural economics different from discount functions in standard economics? How are they similar and how can they be reconciled?
-
Five hundred null hypotheses are tested at the = 0.05 level, and 40 of them are rejected. Assume the tests are independent, a. Assuming that all 500 null hypotheses are true, what is the probability...
-
At the beginning of the tax year, Lizzie holds a $10,000 stock basis as the sole shareholder of Spike, Inc., an S corporation. During the year, Spike reports the following. Determine Lizzies stock...
-
Explain the overview of chemical hazard, causes of chemical hazard, effects of chemical hazard and how to mitigate the chemical hazard at Subang Jaya Airport
-
A process that produces titanium forgings for automobile turbocharger wheels is to be controlled through the use of a fraction nonconforming chart. Initially, one sample of size 150 is taken each day...
-
Assume that a company with 1.000.000 shares has equity valued in 10.000.000. Suppose the company reached its maturity stage such that its ROE coincides with the required return on equity (rE = 10%),...
-
How much is the maturity value if Jay will borrow. worth $5000 at 62% simple interest for years and money 6 months?
-
A student used the following trigonometric substitution. Let x = sec 8, dx = sec 0 tan de The student simplified the integral and gets: tan (0) + tan (0) + c Help the student with the right triangle...
-
3. Let A be an array of integers and let p be an integer. Consider the problem of rearranging the values in A such that: The values that are less than or equal to p are placed before the values that...
-
Thermal Rising, Incorporated, makes paragliders for sale through specialty sporting goods stores. The company has a standard paraglider model, but also makes custom-designed paragliders. Management...
-
Elaborate on the principles of electrochemical engineering in the design of advanced energy storage and conversion systems, including fuel cells, batteries, and electrolyzers, discussing key...
-
Consider the function f(x) = x - 8 - 30x + 13. a) List all the critical values of f(x). Note: Give your answer as a comma separated list eg. "1,2,3" without quotes. If there are no critical values,...
-
Extend Algorithms 3.4 and 3.5 to include as output the first and second derivatives of the spline at the nodes.
-
Describe three elements common to a Graphical User Interface (GUI)? How do these elements make it easier for a user to interact with the computer.
-
Describe the difference between hardware and software and identify two examples of each type?
-
Which has grown at a faster rate, the Internet or the Web? Justify your answer.
-
Assume Knowlton Holdings Ltd. completed these long-term non-strategic investment transactions during 2020 : 1. Journalize Knowlton's investment transactions assuming the company reports any changes...
-
Suppose on February 1, 2020, General Motors paid \(\$ 41\) million for a \(40 \%\) investment in ABC Ltd., an auto parts manufacturer. Assume \(A B C\) earned net income of \(\$ 6\) million and paid...
-
Return to exercise SB-7, the Prudential Bache (PB) investment in CitiCorp bonds. Journalize the following on PB's books: a. Purchase of the bond investment on January 2, 2020. PB expects to hold the...
Study smarter with the SolutionInn App