Question: Write a Matlab function Romberg.m allowing to calculate the integral f(x)dx from a to b using the method of Romberg. We want to use the
Write a Matlab function Romberg.m allowing to calculate the integral f(x)dx from a to b using the method of Romberg. We want to use the Matlab function inline(f) in order to read the function to be integrated in its analytical form, expl: f = inline (sin(x)^2) if f(x) = sin2(x). The input of the function: the expression to be intergrated, the a and b values and the maximum number of intervals n. The output of the function: the integral value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
