Question: NOTE: This is for a math based computer science course 4. Romberg Algorithm in Matlab Preparation: Use helpdesk in Matlab to learn how to use


NOTE: This is for a math based computer science course
4. Romberg Algorithm in Matlab Preparation: Use helpdesk in Matlab to learn how to use the functions feval and quad. (a). Write a Matlab function that computes the Romberg integration. One should be able to call the function by: R romberg('f',a,b,n) where f is the name of the function where f(r) is implemented, and a and b defines the integrating interval, and n is the size of your Romberg table. The function should return the whole Romberg table. The best approximation of the interval would be the value in R(n,n). You may follow the pseudo-code in the lecture notes, or implement your own. You may check your code against the result of the simulation in Section 4.8, to make sure that your code works (b). Use your romberg to compute the integrals sin(a) 2/3) ll
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
