Hello everyone, anyone knows how to approximate a data with polynomial of degree 8 using least square method?
1 view (last 30 days)
Polynomial degree is 8 and it should be approximated piecewise.
- y = a0t0 + a1t1 + a2t2 +… + antn ………………………….. (1)
The first column is Time(GPS format) unit is seconds.
Second column is y values, so I have to find the coefficients (a0, a1...). And this should be done peicewise (9 points), then iterate this method till the end of the data.
Data is attached.
Walter Roberson on 25 Jun 2021
Loop, moving one point at a time. At each location use polyfit on 9 points to create coefficients. polyder() https://www.mathworks.com/help/matlab/ref/polyder.html and evaluate to get velocity. polyder() again and evaluate to get acceleration.
Then move one point further on.