Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / ground / gcs / src / libs / eigen / doc / snippets / LeastSquaresNormalEquations.cpp
blob997cf1715b29f93a66981232486b1b54d9926198
1 MatrixXf A = MatrixXf::Random(3, 2);
2 VectorXf b = VectorXf::Random(3);
3 cout << "The solution using normal equations is:\n"
4 << (A.transpose() * A).ldlt().solve(A.transpose() * b) << endl;