Question: The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: Y = 38.1454t

The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function:
Y = 38.1454t + 0.13743t3 0 ≤ t < 15
y = 1036 + 130.909(t - 15) 16.18425(t - 15)2
-0.428(t - 15)3 15 ≤ t < 33
y = 2900 - 62.468(t - 33)2 16.9274(t - 33)2
10.4 + 796(t - 33)3 t < 33
Develop a well-structured pseudocode function to compute y as a function of t. Note that if the user enters a negative value of t or if the rocket has hit the ground (y ≤ 0) then return a value of zero for y. Also, the function should be invoked in the calling program as height(t). Write the algorithm as (a) pseudocode, or (b) in the high-level language of your choice.

Step by Step Solution

3.45 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Pseudocode FUNCTION heightt IF t 0 THEN y 0 ELSE IF t 15 THEN y 381454t 013743t 3 ELSE IF t 33 THE... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1228-M-N-A-O(841).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!