Question: I need help with this matlab problem. Consider again the error function integral from PA 6 : erf ( x ) = 2 2 0
I need help with this matlab problem. Consider again the error function integral from PA:
erf
For this problem you'll use the following numerical integration approaches to evaluate this integral and generate values for a table similar to what you worked with in PA
Composite trapezoid rule MATLAB trapz andor cumtrapz functions
Three point GaussLegendre quadrature.
MATLAB's builtin integral function Adaptive GaussKronrod Quadrature
Write a function that receives the following single input:
A column vector of one or more values at which erf is to be computed.
Your function should return the following outputs in order, column vectors when input is a vector:
The estimates for erf calculated using composite trapezoid rule between and each of the elements in Evaluate the integrand at and at the input values to compute values for the trapezoid rule.
The estimates of erf calculated using threepoint GaussLegendre quadrature. Work by hand to develop the shifted integrand in terms of and use the appropriate constants and function evaluations.
The estimates of erf calculated using MATLAB's builtin integral function.
Note: The first three test cases use a scalar input for and check each of the methods separately. Code to call your function e
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
