Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Show the code needed to solve the following with MATLAB: Rocket Trajectory. Supp

ID: 3708376 • Letter: S

Question

Show the code needed to solve the following with MATLAB:

Rocket Trajectory. Suppose a small rocket is being designed to make wind sheer measurement in the vicinity of thunderstorms. The height of the rocket can be represented by the following equation: height 2.1.t2-0.0013t4 0.00003414.751 1. Create a function called height that accepts time as input and returns the height of the rocket. Use your function in your solutions to parts (b) and (c) 2. Compute and print the time and height of the rocket fronm the time it launches until hits the ground, in increments of 2 seconds. If the rocket has not hit the ground within 100 seconds, print the values up to 100 seconds

Explanation / Answer

1.

function height = calHeight(t)

%This function calculates height of the rocket given time

height = (2.13* power(t,2)) - (0.0013* power(t,4)) + (0.000034*power(t,4.751));

end

2.

t = 1;

% Plot the graph untill rocket reaches ground i.e. h=0

while(height ~= 0)

h = calHeight(t)

% Plot graph

figure

plot(t,h,'o')

t = t+1; % graph has to plot in the increments of 1

end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote