How to calculate the polynomial coefficients of any arbitrary polynomial to fit data
Posted August 1, 2016 at 08:06 by Tobi
Dear all,
if you are interested in the calculation of polynomial coefficients to fit some data, you can check the method of least squares on my homepage. Here I explained everything in detail and also gave an example how to build the matrix A and the solution vector b for the problem we are discussing there. The polynomial that I am using in the example is:
![\ln(\mu) = A + B \ln(T) + C\ln(T)^2 + D \ln(T)^3 \ln(\mu) = A + B \ln(T) + C\ln(T)^2 + D \ln(T)^3](/Forums/vbLatex/img/6b3f870c876bd3f3a9119e5fff4e6a32-1.gif)
How to build the matrix A and the solution vector b is explained there. Doing this, we end up with a squared matrix the same rank as the two vectors b and x. Hence we can simply find the polynomial coefficients A, B, C and D by solving the following equation:
![\textbf{x} = \textbf{b} \bullet \textbf{A}^{-1} \textbf{x} = \textbf{b} \bullet \textbf{A}^{-1}](/Forums/vbLatex/img/2ad3aaa6d048fc89c6452b590aac0d72-1.gif)
The only difficulty is to calculate the inverse of A (that is in fact really easy by using some Gauss elimination).
http://www.holzmann-cfd.de/index.php...omcoefficients
if you are interested in the calculation of polynomial coefficients to fit some data, you can check the method of least squares on my homepage. Here I explained everything in detail and also gave an example how to build the matrix A and the solution vector b for the problem we are discussing there. The polynomial that I am using in the example is:
![\ln(\mu) = A + B \ln(T) + C\ln(T)^2 + D \ln(T)^3 \ln(\mu) = A + B \ln(T) + C\ln(T)^2 + D \ln(T)^3](/Forums/vbLatex/img/6b3f870c876bd3f3a9119e5fff4e6a32-1.gif)
How to build the matrix A and the solution vector b is explained there. Doing this, we end up with a squared matrix the same rank as the two vectors b and x. Hence we can simply find the polynomial coefficients A, B, C and D by solving the following equation:
![\textbf{x} = \textbf{b} \bullet \textbf{A}^{-1} \textbf{x} = \textbf{b} \bullet \textbf{A}^{-1}](/Forums/vbLatex/img/2ad3aaa6d048fc89c6452b590aac0d72-1.gif)
The only difficulty is to calculate the inverse of A (that is in fact really easy by using some Gauss elimination).
http://www.holzmann-cfd.de/index.php...omcoefficients
Total Comments 0