TutorialLinAlgExSolveColPivHouseholderQR.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file TutorialLinAlgExSolveColPivHouseholderQR.cpp.

5 {
8  A << 1,2,3, 4,5,6, 7,8,10;
9  b << 3, 3, 4;
10  std::cout << "Here is the matrix A:\n" << A << std::endl;
11  std::cout << "Here is the vector b:\n" << b << std::endl;
12  Eigen::Vector3f x = A.colPivHouseholderQr().solve(b);
13  std::cout << "The solution is:\n" << x << std::endl;
14 }
Array< int, 3, 1 > b
MatrixXcf A
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182