Question: Create a function as below: function [I] = compss(f, a, b, n) that takes a function f an interval [a,b], and an even number n

Create a function as below:

function [I] = compss(f, a, b, n) that takes a function f an interval [a,b], and an even number n and returns I, an approximation to Create a function as below: function [I] = compss(f, a, b, n) using Composite Simpson's rule.

If the input is odd, use the error function, that already built in MATLAB, to report an error.

THe function f should be evaluated a total of n+1 times.

We are trying to apply Composite Simpson rule, and build a function with it.

Please help me write this in MATLAB. Explanation also helpful. I am new to this programming. Thanks so much!

f(x)dar

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!