1
1
1alexandr2017-06-12 09:00:46
JavaScript
1alexandr, 2017-06-12 09:00:46

How to calculate the coordinates of a curve?

Hello!
There is a curve built on 5 points (0.22, 0), (0.36, 0.25), 0.61, 0.5), (0.73, 0.75), (0.84, 1).
It is necessary to find the coordinates of the points on the curve if the x values ​​are known.
I tried to solve SLAE from known points to find the coefficients a, b, c, d in an equation like ax**3 + bx**2 + cx + d = y. I used a ready-made solution , but there are suspicions that this code does not work, because results are not tested.
How can this be done with the least amount of effort?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tsarevfs, 2017-06-12
@1alexandr

You need something like this
https://github.com/Tom-Alexander/regression-js
Polynomial regression
I didn't use the library, but that's the point.

S
Sergey Sokolov, 2017-06-12
@sergiks

Is there an understanding of what kind of function should eventually turn out?
Built your points on the graph:
Whether it is experimental data tending to a linear function - then decide by linear regression.
Either the curve should lie exactly along the points, and then it can be the sum of a sinusoid and a linear one, or a curve of some 6th order.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question