I have this data:

--> x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]';
--> y = [1.031, 0.813, 0.795, 0.795, 0.795, 0.795, 0.795, 0.795, 0.795, 0.795]';

That generates this curve: enter image description here

I need to calculate the formula that generates that graphic.

How can I calculate that formula?

  • $\begingroup$ It sure doesn't look like the values are going down as $x$ increases. $\endgroup$ – Gerry Myerson May 6 '18 at 6:14
  • $\begingroup$ Yes, you are right. The values aren't going down as x increases. $\endgroup$ – VansFannel May 6 '18 at 7:04
  • 1
    $\begingroup$ If you want to fit those ten points exactly, and if you don't care what happens anywhere else, look up "Lagrange interpolation". $\endgroup$ – Gerry Myerson May 6 '18 at 10:14

The question is not clear enough. Do you want an exact formula or an approximate formula ?

A exact formula, that is an equation for three linear segments, would involve the Heaviside function. I suppose that is not that what you want.

An approximate formula is ambiguous without more specification (criterium of fitting, range of acceptable deviation, etc.). They are an infinity of formulas depending on those specifications.

For example the formula : $$y\simeq 0.795+3.094\:e^{-2.573\:x}$$

enter image description here

Of course, with this formula, the points are accurate, but not the cuve compared to the straight segments between the points as drawn on your graph.

  • $\begingroup$ Thanks. I have to find the mathematical relationship between the y value and the x value. $\endgroup$ – VansFannel May 6 '18 at 7:13
  • $\begingroup$ That is my answer. What do you want : An exact relationship or an approximate relationship ? $\endgroup$ – JJacquelin May 6 '18 at 7:15
  • $\begingroup$ Thanks again. For an exact relationship, do you need more values? I think I don't need a lot of accuracy. $\endgroup$ – VansFannel May 6 '18 at 7:23
  • $\begingroup$ What do you want : An exact relationship ONLY for the 10 given points, or an exact relationship for the given points AND for the straight lines between the points as they are drawn on your graph ? $\endgroup$ – JJacquelin May 6 '18 at 7:27
  • $\begingroup$ An exact relationship ONLY for the ten given points. $\endgroup$ – VansFannel May 6 '18 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.