Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
Numerical integration of polyfit coefficients
Replies:
6
Last Post:
Dec 12, 2013 5:50 PM




Re: Numerical integration of polyfit coefficients
Posted:
Dec 12, 2013 5:38 PM


TideMan <mulgor@gmail.com> wrote in message <beba74a5d03743b49dabd8a1688d2259@googlegroups.com>... > On Friday, December 13, 2013 7:59:28 AM UTC+13, John D'Errico wrote: > > "Rajin " <patelr37@aston.ac.uk> wrote in message <l8ctcd$jrp$1@newscl01ah.mathworks.com>...
> > My question is: why fit a curve at all? > Why not do numerical integration of the histogram/pdf?
A valid question. One that I cannot answer, since we have been given no information about the purposes of this task.
I suppose if one wishes to compute an approximate CDF given data, based on a curve fit, one might do as the OP has asked. Even then, a valid question is why they are doing it this way. Asking for a high degree of accuracy from a sampled histogram, then doing it using a 12th degree polynomial is just plain silly, IMHO.
I might suggest a simple interpolation. Perhaps piecewise linear, or at most pchip which has nice interpolation properties for such a problem. Trivial to integrate. Trivial to use.
Too often I see someone come along with a problem to solve that was given to them by someone above. Knowing no better, they try to move heaven and earth to do as they were told, regardless of the foolishness of the task.
John



