This function demonstrates a way to calculate the integral of a function as a summation of sub areas under its curve. It can be used in case of the actual functions are not known and only data points are available.
MS (2020). Integral calculation based on data points arrays (https://www.mathworks.com/matlabcentral/fileexchange/72830-integral-calculation-based-on-data-points-arrays), MATLAB Central File Exchange. Retrieved .