Question: Q . 2 ( HW# 7 ) A rocket is launched vertically. At time = 0 , when the rocket's engine shuts down, the rocket

Q.2(HW#7)
A rocket is launched vertically. At time =0, when the rocket's engine shuts down, the rocket has reached an altitude of h0 and is moving with a velocity of V0ms. The height the rocket as function of time is:
h=-g2t2+V0t+h0
(a) Use input command to prompt the user to enter the following parameters: V0=125ms,h0=500m and g=9.8ms2.
(b) Create a MATLAB function called 'rocket' to calculate the height of the rocket and plot the height versus time from 0 to 35s with an increment of 0.2s.
(c) Use the ginput command to find the time when the rocket starts to fall back to the ground and the time when it hits the ground. Use disp and fprintf commands to display the results as follow: "the rocket starts to fall back at t=dots "; "the rocket hits the ground at t=dots "
Q . 2 ( HW# 7 ) A rocket is launched vertically.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Programming Questions!