• [OT] Smoothing a curve

    From RGVickson@shaw.ca@21:1/5 to Centexbel on Wed Aug 12 10:27:46 2015
    On Wednesday, July 15, 2015 at 6:46:48 AM UTC-7, Centexbel wrote:
    Hello,

    not a specially Maple question but I have some 20000 (X, Y)
    values starting as follow :

    172.013964 1.5688
    172.013965 1.5600
    172.013968 1.5568
    172.013969 1.5557
    172.013978 1.5541
    172.013990 1.5762
    172.013994 1.5629
    172.014001 1.5719
    172.014002 1.5629
    172.014004 1.5566
    172.014005 1.5606
    172.014016 1.5441
    172.014026 1.5610
    172.014036 1.5672
    172.014054 1.5655
    172.014054 1.5643
    172.014060 1.5629
    172.014072 1.5579
    172.014073 1.5602
    172.014089 1.5590
    172.014093 1.5608
    172.014106 1.5502
    172.014130 1.5593
    172.014144 1.5624
    172.014148 1.5630
    172.014151 1.5581
    172.014172 1.5754
    172.014181 1.5726
    172.014203 1.5589
    172.014213 1.5607
    172.014231 1.5699
    172.014234 1.5574
    172.014238 1.5482
    172.014250 1.5650
    172.014263 1.5594
    172.014263 1.5656
    172.014288 1.5716
    172.014289 1.5618

    How can I find an estimated value of Y for any X value ?


    Regards,

    Philippe Lemaire

    --- news://freenews.netfront.net/ - complaints: news@netfront.net ---


    You can do a least-squares fit manually. If, for example, you want a linear fit of the form y = a + b*x, a least-squares fit is obtained from the minimization of S = sum_{i=1..N} (a + b*x[i]-y[i])^2. You can either use the standard, well-known formulas
    for the "best" a and b, or you can let Maple set the derivatives diff(S,a) and diff(S,b) to zero, and solve the linear equations using "solve" or "fsolve".

    If, instead, you want a quadratic, then minimize S = S(a,b,c) =sum_{i=1..N}(a + b(x[i]+c*x[i]^2)^2.

    In general, to fit a function of the form y = f(x,a1,a2,a3,...) involving some unknown parameters a1,a2,a3,..., you want to minimize S(a1,a2,a3,...) = sum_i (f(x[i],a1,a2,a3, ...) - y[i])^2, which you might be able to do by numerical equation-solving,
    etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)