Integrating functions given at discrete points via MATLAB
autarkaw
When integrating functions given at discrete data points in MATLAB, trapz is the function of choice to go for. But we can get more accurate results by interpolating via cubic splines with the MATLAB spline function. Since the spline function is made of piecewise cubics, Simpson’s 1/3rd rule can be used to exactly integrate them. … Continue reading "Integrating functions given at discrete points via MATLAB"
