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

(a) Plot the velocity v versus time t from 0 to 30 s. Add labels and grid. Use M

ID: 3720631 • Letter: #

Question

(a) Plot the velocity v versus time t from 0 to 30 s. Add labels and grid. Use MATLAB fplot function.
(b) Define a vector t from 0 to 30 with step size 3 and find the corresponding values of v. Display the results in columns where first column is time t and second column is the corresponding value of v. Use disp command.
c) Determine how high the rocket will fly in 30 s using Trapezoidal rule with n = 1, 2, 4, 6, . . . , 20. You can use the function trap but you have to know how to use it and how it works.
(d) Determine how high the rocket will fly in 30 s using Simpson’s 1/3 rule with n = 2, 4, 6, . . . , 20. Use the function simpson13.
(e) Determine how high the rocket will fly in 30 s using Simpson’s 3/8 rule with n = 3.
(f) Determine how high the rocket will fly in 30 s using Romberg methods with s = 0.005%. What is the order of accuracy of the achieved result. Use romberg function.
(g) Determine how high the rocket will fly in 30 s using two and three-point Gauss quadrature.
(h) Determine how high the rocket will fly in 30 s using MATLAB quad function. c) Determine how high the rocket will fly in 30 s using Trapezoidal rule with n = 1, 2, 4, 6, . . . , 20. You can use the function trap but you have to know how to use it and how it works.
(d) Determine how high the rocket will fly in 30 s using Simpson’s 1/3 rule with n = 2, 4, 6, . . . , 20. Use the function simpson13.
(e) Determine how high the rocket will fly in 30 s using Simpson’s 3/8 rule with n = 3.
(f) Determine how high the rocket will fly in 30 s using Romberg methods with s = 0.005%. What is the order of accuracy of the achieved result. Use romberg function.
(g) Determine how high the rocket will fly in 30 s using two and three-point Gauss quadrature.
(h) Determine how high the rocket will fly in 30 s using MATLAB quad function.

Explanation / Answer

(a)

g=9.81;u=1800;m0=160000;q=2500;

t=0:30;

v=u.*log(m0./(m0-q.*t))-g.*t;

grid on;

fplot(v,t);

b)

g=9.81;u=1800;m0=160000;q=2500;

t=0:3:30;

v=u.*log(m0./(m0-q.*t))-g.*t;

disp(t;v)