Hard Light Productions Forums
Off-Topic Discussion => General Discussion => Topic started by: Enigmatic Entity on May 15, 2010, 08:29:25 am
-
I have some temperature measurements at 4 circular sections of a cylinder, and have to average them using Simpson's rule, this being a small bottleneck of a larger project at the moment... :sigh:
The problem is that Simpson's rule seems to use "f(a)", "f(b)", "f(a+b)", etc. Except I have four data points, separated by an equal distance. How do I use Simpson's rule for this? :confused:
-
(http://realdirtymets.files.wordpress.com/2009/05/simpsons-the-doh-49005791.jpg)
-
if you have four data points, that means you have the function evaluated at those points, yes? namely, you have f(a), f(b), f(c), f(d). call the distance between them deltaX and you have f(b)=f(a+deltaX), etc.
-
You can do Simpson-type approximations for any number of points. A 4-point formula is given here (http://en.wikipedia.org/wiki/Simpson_rule) down the page.