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

Write a MATLAB script file to solve y(t)=1.5e-3t cos(2t) using rectangular metho

ID: 3849905 • Letter: W

Question

Write a MATLAB script file to solve y(t)=1.5e-3t cos(2t) using rectangular method, meaning that use the formula of A_new=A_old+f(t_i)*dt. Your code must solve the integrations using all three methods of left sum, right sum and centered sum then display the answer to all three methods for the following points: t=0 to 8.0 with t=0.5. Compare your answers with solution of the function using “integral” command. Which rectangular method is closer to “integral” solution?-3t cos(2t) using rectangular method, meaning that use the formula of A_new=A_old+f(t_i)*dt. Your code must solve the integrations using all three methods of left sum, right sum and centered sum then display the answer to all three methods for the following points: t=0 to 8.0 with t=0.5. Compare your answers with solution of the function using “integral” command. Which rectangular method is closer to “integral” solution?

Hint: For solving this problem you need three “for” loops, the first one starts at “0” to calculate left-sum, the second one starts at 0.25 to calculate center-sum, and the last one starts at 0.5 to calculate right-sum (alternatively you can use one loop but o.25 and 0.5 should be added to the xi values for centered sum and right sum, respectively). Please make sure you use different counters for each loop (A_new=A_old+f(t_i)*dt). Also, for the first A_old since no value is available, use zero.

Explanation / Answer

rectangle('Position',pos)
rectangle('Position',pos,'Curvature',cur)
rectangle(___,Name,Value)
rectangle(ax,___)
r = rectangle(___)

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