04b: MATLAB Trapezoidal Rule Demo
Channel: Jaisohn Kim VT
Date: 2020-10-18

Virginia Tech ME 2004: MATLAB Trapezoidal Rule Demo (04b)
04a and 04b comprise a two-part demo on numerical integration via the Trapezoidal Rule in MATLAB.
04a: Reviews Trapezoidal Rule theory. 
04b: Implements the Trapezoidal Rule in MATLAB to compute the total distance traveled given a discrete data set. 

Blank code: https://github.com/tjkim96/Numerical-Methods-Codes/blob/main/05%20Numeric%20Differentiation%20and%20Integration/NumericIntegrationDemo_blank.m
Master code (complete and commented): https://github.com/tjkim96/Numerical-Methods-Codes/blob/main/05%20Numeric%20Differentiation%20and%20Integration/NumericIntegrationDemo_master.m
Data file: https://github.com/tjkim96/Numerical-Methods-Codes/blob/main/05%20Numeric%20Differentiation%20and%20Integration/velocityvstime.mat

Documentation:
https://www.mathworks.com/help/matlab/ref/trapz.html