0

MathNet 行列計算を使用して、2 次多項式の係数を計算しました。

Matrix<double> A = CreateMatrix.DenseOfColumnArrays(xPointsSquared, yPoints, ones);
            Matrix<double> Y = CreateMatrix.DenseOfColumnArrays(yPoints);

Matrix<double> C = A.TransposeThisAndMultiply(A).Cholesky().Solve(A.TransposeThisAndMultiply(Y));

However, the coefficients created by this does not give the accurate curve. It creates a line that nowhere runs along the scatterplot of the data points.

I suspect this is because of the functions using double as opposed to decimal. Can anyone please help me get around this?

4

0 に答える 0