Question: Write a function [ fArea ] = TrapIntegral ( x 1 , fx 1 ) that accepts 1 D arrays containing a set of points

Write a function [fArea]= TrapIntegral(x1,fx1) that accepts 1D arrays containing a
set of points x1 and a set of values fx1 calculated or measured at those same points,
and returns the trapezoidal integral fArea2 across the entire range of x1 values. (Hint:
there will be one less trapezoid than the number of x1 values)
Write a script yourBlazerID_IntegralTest.m that generates test arrays x1 and fx1,
calls your function TrapIntegral, and tests that the output is correct. You can use any
reasonable test strategy, but you have to include comments in your script that clearly
explain your strategy and how your test(

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 Programming Questions!