TutorialLinAlgExSolveColPivHouseholderQR.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace std;
00005 using namespace Eigen;
00006 
00007 int main()
00008 {
00009    Matrix3f A;
00010    Vector3f b;
00011    A << 1,2,3,  4,5,6,  7,8,10;
00012    b << 3, 3, 4;
00013    cout << "Here is the matrix A:\n" << A << endl;
00014    cout << "Here is the vector b:\n" << b << endl;
00015    Vector3f x = A.colPivHouseholderQr().solve(b);
00016    cout << "The solution is:\n" << x << endl;
00017 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:27