(0,0.0028), (5, 5.0056), (10, 10.0085), (15, 15.0028), (20, 20.0000)
No need to have knowledge in programming in MATLAB neither necessary to know the functions used there; only run the program proposed in the Blog, putting your data as parameters. Take a thorough reading a the article and you will find that is pretty clear.i dont have experience with matlab. does it necessary to learn matlab? or can we find those values without using matlab?
if i use fourth order,
y(x) = a0 + (a1X) + (a2 X^2) + (a3 X^3) + (a4 X^4);
a = 2.800000011407233E-03
b = 9.989599999940542E-01
c = 5.463333344061239E-04
d = -5.200000006760561E-05
e = 1.346666667955809E-06
CurveExpert Pro is an easy and inexpensive solution for such tasks
https://www.curveexpert.net/products/curveexpert-professional/
Results with your data from the first post
Final Result [Linear Regressions/Polynomial Regression (degree=4)]:
Equation : a + b*x + c*x^2 + ...
Code:a = 2.800000011407233E-03 b = 9.989599999940542E-01 c = 5.463333344061239E-04 d = -5.200000006760561E-05 e = 1.346666667955809E-06
Just write: fit (0,0.0028), (5, 5.0056), (10, 10.0085), (15, 15.0028), (20, 20.0000)
in WolframAlpha
Thanks for the link. But i want polynomial regression. It has only quadratic, cubic, periodic.
For points (0,-0.0028), (5, 5.0028), (10, 10.0085), (15, 15.0085), (20, 20.0028)
Equation : a + b*x + c*x^2 + d*x^3 + e*x^4
I got a = 0.000000000000000E+00
b = 9.992666666666679E-01
c = 3.876666666663420E-04
d = -2.866666666669071E-05
e = 5.733333333341568E-07
When i substitue x = 10.0085, I got 10.0170060541.
My colleague has given me the below values,
a = 0.002797879
b = 0.999566
c = -0.000223561
d = 0.0000192495
e = -0.000000384297
When i substitute these values with x = 10.0085, I got 10.00000264.
How these a,b,c,d,e values are attained? Please help.
format long
x = [0,5,10,15,20]; % Data X
y = [-.0028, 5.0028, 10.0085, 15.0085, 20.0028]; % Data Y
A = polyfit(x,y,4)' % Output: [e ; d ; c ; b ; a]
y = x + (-8.4 + 1.3*x + .673*x^2 - .058*x^3 + .00116*x^4)/3000
I have used x = 10.0085, I obtained y = 10.01700566
Still there is an error.
Please review my comment about calculation accuracy problems. I got similar problems with MS Excel. I believe that Matlab should give better accuracy because it's using double precision float, but I didn't check. Technically it's clear hiw the solution can be obtained, in case of the interpolation problem (4th order poynomial), you get the coeffcients by solving a system of linear equations. Not achieving the expected calculation accuracy hasn't to do with the solution principle.Still there is an error.
I have used x = 10.0085, I obtained y = 10.01700566.
Still there is an error.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?