Question: Can someone please help me with problem 2? The code provided below is the code that needs to be modified so that problem 2 is

Can someone please help me with problem 2? The code provided below is the code that needs to be modified so that problem 2 is satisfied.

Can someone please help me with problem 2? The code provided below

clc clear disp('ENGR15100 Prelab 9') disp('Your name here') disp(' ') %Run script file for rocket calculations rocket2h2 %rocket2h2.m % clc b=input('Enter desired burn time '); disp(' ') h_des=input('Enter desired height '); disp(' ') dt=.1; m=10; f=2000; g=32.2; %calculate constants v_b=(f/m-g)*b; h_b=0.5*(f/m-g)*b^2; h_p=h_b+v_b^2/(2*g); t_p=b+v_b/g; figure(2) %Begin calculating flight h=0; k=0; while h>=0 t=k*dt; k=k+1; if th_des %do-able! h=0; k=0; t=0; while h PURPOSE: To motivate the use of a function. Each Script file below is to be stand alone and should begin with clc and clear Problem 1 Based on the rocket code of pre-lab 9, write a script file firstname_lastname_lab9_probem1.m to: i) Ask the user to enter the values of the rocket mass m in lbs, engine force f in lbs, and the engine burn time b in seconds. In the input prompt strings specify that m is to be between 5 and 15 lb, f is to be between 50 and 500 lbs, and b between 5 and 20 seconds. Note that the numbers do not have to be integers Calculate the flight parameters of rocket velocity at engine shut down v_b, rocket altitude at engine shut down h_b, peak altitude h_p, and the time to peak altitudet_p. ii) ) Display (using fprintf) messages with values of the four variables calculated above, including the correct associated units. Problem 2 Based on the rocket code of pre-lab 8, write a script file firstname lastname lab9 problem2.m to: ) Calculate the altitude h from the time of launch to ground impact. Again ask the user to input the values as in Problem 1, and again use dt 0.1 S. i) Create the plot of h versus t in figure 2, add x and y labels, title, and a gridl

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 Databases Questions!