Search code examples
curve-fittingdata-fittingfunction-fitting

Fitting a curve


I hope this is the right place to ask this question.

I have a curve that I'd like to fit, but I don't know exactly what kind of fitting would be appropriate.

The curve is the following:

enter image description here

y is converging towards 1 when x grows to infinity.

I tried something like f : x -> 1-k*exp(-l*x) but the result is far from convincing.

I have no clue where to start here, anyone has an idea?

Here are the data used to build the above figure. it takes me 1.5 minutes to compute one point of my function.

x = [0.04, 0.08, 0.12, 0.16, 0.2 , 0.24, 0.28, 0.32, 0.36, 0.4 ]

y = [0.71368682, 0.79734766, 0.83832184, 0.86394632, 0.8818312 , 0.89515722, 0.90553446, 0.91387899, 0.92075551, 0.92653329]

Thanks a lot!


Solution

  • What make you assume that " y is converging towards 1 when x grows to infinity" ?

    This doesn't match to the data. Or the data is in a too small range far from large x. Or the kind of function thay you choose might be not convenient.

    For example assuming another exponential function :

    enter image description here

    Using the regression method shown pages 16-17 in : https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales the numerical calculus and result is :

    enter image description here

    If the limit at x infinit is definitively 1 you should look for another kind of function. Without clue from the origin of data one have to proceed by trial and error.