Question: !!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!! !!! I UPVOTE FAIRLY !!! !!!

!!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!!

!!! I UPVOTE FAIRLY !!!

!!! PLEASE TEACH ME SO I CAN UNDERSTAND (PUT COMMENTS) !!!

!!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!!

21.2 Write a well-commented MATLAB function program myints whose inputs are f, a, b and n and whose outputs are L, R and T, the left, right and trapezoid integral approximations for fon (a, b) with n subintervals. To make it efficient, take advantage of the fact that Ar; is constant, use x - linspace(a,b,n+1) to make the r values, use y = f(x) to make the y values, use slice and sum to add the 2nd to nth y entries once, and then add on the missing terms to obtain the left, right and trapezoid approximations. Change to format long and apply your program to the integral i vode. Compare with the results of the previous exercise. Also find L100, R100 and T100 and the percentage errors of these approximations. Turn in the program and a brief summary of the results

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!