JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
|
Functions | |
template<class InputItX , class InputItY , class OutputItP > | |
void | jkqtpstatPolyFit (InputItX firstX, InputItX lastX, InputItY firstY, InputItY lastY, size_t P, OutputItP firstRes) |
fits (in a least-squares sense) a polynomial of order P to a set of N data pairs | |
|
inline |
fits (in a least-squares sense) a polynomial of order P to a set of N data pairs
InputItX | standard iterator type of firstX and lastX. |
InputItY | standard iterator type of firstY and lastY. |
OutputItP | output iterator for the polynomial coefficients |
firstX | iterator pointing to the first item in the x-dataset to use | |
lastX | iterator pointing behind the last item in the x-dataset to use | |
firstY | iterator pointing to the first item in the y-dataset to use | |
lastY | iterator pointing behind the last item in the y-dataset to use | |
P | degree of the polynomial (P>=N !!!) | |
[out] | firstRes | Iterator (of type OutputItP ), which receives the (P+1)-entry vector with the polynomial coefficients |
This function uses jkqtpstatLinSolve() to solve the system of equations