Discussion Overview
The discussion revolves around finding the area under a curve represented by discrete measurements in MATLAB. Participants explore various integration methods and their accuracy, as well as the challenges of using built-in functions for this purpose.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant seeks to integrate a set of measurements in MATLAB but finds that existing functions require a function file.
- Another participant suggests using the 'trapz' function, which can calculate the area over a vector of values.
- A participant expresses concern about the accuracy of 'trapz', stating that it is insufficient for their precision requirement of 1e-3.
- There is a suggestion that reducing the step size through interpolation could improve accuracy.
- A later reply questions the estimation of error from the 'trapz' method, arguing that without a known "real" area, the concept of error is not applicable to discrete data.
- Another participant mentions having 500 data points and confirms that linear interpolation did not change the calculated areas using 'trapz'.
- One participant proposes using Simpson's formula for integration, which involves fitting parabolas to sets of three points.
- There is a request for a built-in MATLAB function for Simpson's method, with a suggestion to search the MathWorks site for user-developed functions.
Areas of Agreement / Disagreement
Participants express differing views on the accuracy of the 'trapz' method and the applicability of error estimation for discrete data. There is no consensus on the best method for integration, as multiple approaches are discussed.
Contextual Notes
Participants mention the importance of step size and the nature of the data points, indicating that the accuracy of integration methods may depend on these factors. The discussion does not resolve the uncertainties surrounding the best integration technique for the given data.