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...
-
The table provides the ages of all 50 heads of households in a small Nova Scotian fishing village. The distribution of these ages is characterized by = 47.18 and = 14.74. a. Find the mean of the...
-
Beth purchased a $50,000 nonparticipating whole life insurance policy. The annual premium was $1,278. The cash value of the policy after 10 years will be $13,740. The future value of $1 deposited at...
-
Why do some insurance companies offer discounts to drivers who install security devices in their vehicles?
-
Metal Products, LLC, manufactures metal beverage containers. The division that manufactures soft-drink beverage cans for the North American market has two plants that operate 24 hours a day, 365 days...
-
Question 1 (4 Marks) Richard must decide how to allocate the capital in his portfolio. Richard has $58,000 available to invest. He finds the rates of return for four stocks for the past 12 years and...
-
For each of the following cases, respond to the question and indicate the accounting principle or concept that applies. 1. Williamson, LLC, paid insurance premiums of $8,400 on December 1, 2019....
-
118. The recombination frequency between the genes a &c is 5%, b & c is 15%, b & d is 9%, a & b is 20%, c & d is 24% and a & d is 29%. What will be the sequence of these genes on a linear chromosome?...
-
Four charges are located at the four corners of a square with charge values and side length as shown. Let positive x be towards the right of the page, and let positive y be towards the top of the...
-
Describe how boundary layer theory is used to analyze momentum and heat transfer in complex fluid flow systems. What are the key factors that influence the thickness and behavior of boundary layers...
-
1. A company purchases feed supplements for their pigs from Round Up Feed in the amount of $1,000 on account. 1. What is the initial journal entry for this transaction? 2. NET 30: What will be the...
-
Discuss four important issues that will shape compensation professionals work for years to come. Explain in details.
-
If its initial velocity is 1.0 m/s, at what time is its displacement 5.0 m? If its initial velocity is 1.0 m/s, at what time is its displacement 5.0 m?
-
IMPORTANT ? Do not use the var keyword. Instead use let or const. ? Do not use document.write() 3. a program in Javascript to do the following you can assume that the user enters correct ...
-
Use of the contraceptive Depo Provera appears to triple women's risk of infection with chlamydia and gonorrhea , a study reports today. An estimated 20 million to 30 million women worldwide use Depo...
-
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.
-
Consider the following variant of Nim called Split-Nim, which is played with heaps of tokens as in Nim. Like in Nim, a player can remove some tokens from one of the heaps, or else split a heap into...
-
In \(m \times n\) Cram (see Exercise 1.4), a rectangular board of \(m \times n\) squares is given. The two players alternately place a domino either horizontally or vertically on two unoccupied...
-
The impartial game Gray Hackenbush is played on a figure consisting of nodes and edges that are connected to these nodes or to the ground (the ground is the dashed line in the pictures below). A move...
Study smarter with the SolutionInn App