Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a user-defined MATLAB function for integration with the composite Simpson's method of a function f(x) that is given in a set of n discrete

image text in transcribed

image text in transcribed

Write a user-defined MATLAB function for integration with the composite Simpson's method of a function f(x) that is given in a set of n discrete points that are spaced equally. For the function name and arguments use ESimpsonPoints(x,y, where the input arguments x and y are vectors with the values of x and the corresponding values of fox), respectively. The output argument Iis the value of the integral. If the number of intervals in the data points is divisible by 3, the integration is done with the composite Simpson's 3/8 method. If the number of intervals in the data points is one more than a number divisible by 3, the integration in the first interval is done with the trapezoidal method and the integration over the rest of the intervals is done with the composite Simpson's 3/8 method. If the number of intervals in the data points is two more than a number divisible by the integration over the first two intervals done Simpsons's 1/3 method and the integration over the rest of the intervals is done with the composite Simpson's 3/8 method. Use SimpsonPoints to solve Problem 2. Write a user-defined MATLAB function for integration with the composite Simpson's method of a function f(x) that is given in a set of n discrete points that are spaced equally. For the function name and arguments use ESimpsonPoints(x,y, where the input arguments x and y are vectors with the values of x and the corresponding values of fox), respectively. The output argument Iis the value of the integral. If the number of intervals in the data points is divisible by 3, the integration is done with the composite Simpson's 3/8 method. If the number of intervals in the data points is one more than a number divisible by 3, the integration in the first interval is done with the trapezoidal method and the integration over the rest of the intervals is done with the composite Simpson's 3/8 method. If the number of intervals in the data points is two more than a number divisible by the integration over the first two intervals done Simpsons's 1/3 method and the integration over the rest of the intervals is done with the composite Simpson's 3/8 method. Use SimpsonPoints to solve Problem 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago