Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

If we have a data set consisting of N data pairs: x n ,y n there will be N-1 intervals between data pairs. In the above diagram, the lessor of the two edges has been selected for the y value of the...

1 answer below »

If we have a data set consisting of N data pairs: xn,ynthere will be N-1 intervals between data pairs.

In the above diagram, the lessor of the two edges has been selected for the y value of the rectangle, and the width of the rectangle is xn-1– xn

We can therefore write the estimated area as:

Write a MATLAB function and save a file with name Area which will estimate the area from a data set:

Arguments to the function will be:

an array of x values and
an array of y values

Calculations

Identify how many data points have been provided in array x.
Initialize the estimated area variable to zero.

Use a for loop which counts n from 1 to (data point count -1)

Determine width of rectangle
Determine height of rectangle
Calculate the area of the rectangle
and add to estimate for area
end

Return the estimated area

Using the MATLAB editor, create a script m-file for the following:

Read thedata fileand assign values to arrays.
Create a x-y scatter plot of the data with title and labels.
Calculate the estimated area under the curve.
Present the estimate of area

Answered Same Day May 22, 2021

Solution

Manoj answered on May 23 2021
139 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here