Question: help with matlab please! Problem 1) A rocket is launched vertically. After the rocket has reached 500 m, the rocket's engine shuts down. At that

help with matlab please!
Problem 1) A rocket is launched vertically. After the rocket has reached 500 m, the rocket's engine shuts down. At that time (t = 0), the rocket is rising at a velocity of 125 m/s. Gravity takes over now and the height of the rocket as a function of time tis h = -1/2 gt2.125 t + 500 Write a MATLAB function called hw3p1 lastname height that accepts as input the time (seconds), and provides as output the height of the rocket(m). Problem 2) In a separate script called hw3_lastname, call your function from problem 1 and evaluate the height of the rocket after 2 minutes. Problem 3) Create a new function called hw3 p3 lastname height(that accepts both time and the acceleration of gravity as inputs. That is: ht.8) -- 1/2gt2 + 125 t 500 Problem 4) In your hw3 lastname script file, use the function from problem 3 to compare the height of the rocket after 2 minutes when it is launched from earth to the height when it is launched from the moon. Problem 5) In your hw3 lastname script file, use the function from problem 3 to plot two rocket heights. The first curve should be the result of a rocket launched from the earth. The second curve should be launched from the moon. Create a legend which identifies the two curves and label the axes on your graph. The plot should show at least five minutes of flight time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
