Question: Matlab Provide the complete code explianing how you implemented it for the following problem please! Rocket Trajectory Problem A model describing the vertical trajectory of

Matlab
Provide the complete code explianing how you implemented it for the following problem please!
Rocket Trajectory Problem
A model describing the vertical trajectory of a rocket is given by:
dh(t)dt=v(t)
(ms+mp(t))dv(t)dt=-(ms+mp(t))g+up(t)ve-12v(t)|v(t)|ACD
dmp(t)dt=-up(t)
Where:
h(t) is the height reached by the rocket in meters.
v(t) is the velocity of the rocket in meters per second.
mp(t) is the mass of the fuel in kilograms.
up(t) in kgs is the rate at which the fuel is consumed (this is considered as the input of the system).
ms=50kg is the weight of the "shell. of the rocket.
g=9,81ms2 is the acceleration due to gravity.
=1,091kgm3 is the average air density.
A=r2 is the maximum cross-sectional area of the rocket, where r=0,5m.
ve=325ms is the exhaust velocity of the fuel.
CD=0,15 is the drag coefficient of the rocket.
mp0=100kg is the initial mass of the fuel at time t=0.
The fuel consumption is up(t)=20kgs for the first 5 seconds. After the 5 s the fuel consumption up(t)=0kgs.
Tasks
(a) Plot the height reached by the rocket until the moment it hits the ground. To do so, implement the 4th order
Runge-Kutta algorithm to solve the system of differential equations.
(b) Do the same as part (a), but instead of implementing the algorithm directly, use the ode 45 function in MATLAB.
(c) Plot the responses obtained from the previous two parts on the same coordinate axis to compare the results.
Use the legend function to identify each height.
Matlab Provide the complete code explianing how

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 Mechanical Engineering Questions!